AppManager Class
The AppManager class is used to manage application data in Bitrix24. It extends the functionality of AbstractHelper and provides methods for retrieving application data and obtaining a textual description of the application's status.
TIP
You can test working with AppManager in this example.
Getters
data
get data(): TypeAppReturns the application data of type TypeApp.
statusCode
get statusCode(): stringReturns a textual description of the application's status.
Uses the StatusDescriptions object to convert the status from TypeApp into a textual description.
If the status is not recognized, it returns 'Unknown status'.
Data Types
- The
EnumAppStatusenumeration and theStatusDescriptionsobject are used together to manage and display application statuses in a more readable format.- The
TypeEnumAppStatustype helps ensure type safety when working with application statuses.
EnumAppStatus
The EnumAppStatus enumeration defines various statuses that an application can have.
Free: 'F': Free application.Demo: 'D': Demo version of the application.Trial: 'T': Trial version of the application with limited usage time.Paid: 'P': Paid application.Local: 'L': Local application.Subscription: 'S': Subscription-based application.
StatusDescriptions
The StatusDescriptions object provides textual descriptions for each application status defined in EnumAppStatus.
F:'Free'— Free application.D:'Demo'— Demo version.T:'Trial'— Trial version.P:'Paid'— Paid application.L:'Local'— Local application.S:'Subscription'— Subscription-based application.
TypeEnumAppStatus
The TypeEnumAppStatus type represents the keys of the EnumAppStatus enumeration. It is used to restrict the values that can be assigned to variables or parameters related to the application's status.
TypeApp
The TypeApp type represents information about an application.
id: number: Local identifier of the application on the portal.code: string: Application code.version: number: Installed version of the application.status: TypeEnumAppStatus: Application status.isInstalled: boolean: Flag indicating whether the application is installed.