Views: 722
Last Modified: 27.04.2023

Applications for the new Chat design

All embeddings have standard format and are registered via the method placement.bind. For example:

CRest::call(
    'placement.bind',
    [
        'PLACEMENT' => 'IM_SIDEBAR',
        'HANDLER' => 'https://example.com/apps/immarket/handlers/sidebar.php',
        'LANG_ALL' => [
            'en' => [
                'TITLE' => 'Application in sidebar',
            ],
        ],
        'OPTIONS' => [
            'iconName' => 'fa-bug',
            'context' => 'USER;LINES',
            'role' => 'ADMIN',
            'extranet' => 'N',
        ]
    ]
);

Let's overview the section OPTIONS in detail:

  • iconName – application icon (this is a code from library Font Awesome 6.0). Icon is displayed everywhere, except for context menu and smiley selector;
  • context – app rendering context. If you can display the application only for specific types of chats (active for all chat types by default);

    Note: The option ALL has a highest priority above all the rest of options, that's why there is no sense to list other types of chats together with it. If such has occurred, the values for specific chat types will be ignored. Due to this, an incorrect value of one of passed options will still get an error upon registering the app.

  • role – user role to display this application, to show this application для которой будет показываться это приложение (by default USER – available to all);
  • extranet – application available for extranet users "Extranet" allows for company to implement conference calls with suppliers, distributors and other external users without access to internal corporate information.

    External users (extranet users) do not have access to your internal Bitrix24, do not see the structure and any other company information, they can work only inside special extranet groups or projects.

    Learn more...
    (disabled by default).




Courses developed by Bitrix24