Documentation

Additional events

Event Description
OnInfoLine Event for collecting data about connected Open Channels.
Returns Open Channel ID.
You must pass an outbound description array.

Example:

\Bitrix\Main\EventManager::getInstance()->addEventHandler("imconnector", "OnInfoLine", Array("Info", "OnImConnectorInfoLineHandler"));

class Info
{
  function OnImConnectorInfoLineHandler(\Bitrix\Main\Event $event)
  {
     $lineId = $event->getParameter('LINE_ID');

     return array(
        //connector ID*
        'connector_id' => 'baseconnector',
        //ID
        'id' => '555',
        //Channel link
        'url' => 'http://test',
        //Link for mobile devices
        'url_im' => 'http://test.im',
        //Displayed name
        'name' => 'Test',
        //Image
        'picture' => array(
           'url' => '//opt-560835.ssl.bitrix-cdn.com/bitrix/templates/bitrix-new/images/logo.png?1'
        )
     );
  }
}
OnDeleteLine Event for deleting an Open Channel. For deleting your connected connectors. Passes the parameter LINE_ID - deleted Open Channel ID.
© «Bitrix24», 2001-2024