- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/sitebutton/channel/channelwhatsapp.php
- Класс: Bitrix\Crm\SiteButton\Channel\ChannelWhatsApp
- Вызов: ChannelWhatsApp::getWidgets
static function getWidgets($id, $removeCopyright = true, $lang = null, array $config = array())
{
Loc::loadMessages(__FILE__); // TODO: remove with dependence main: deeply lazy Load loc files
if (!self::canUse())
{
return array();
}
$widgets = array();
$type = self::getType();
$widget = array(
'id' => $type,
'title' => Loc::getMessage('CRM_BUTTON_MANAGER_TYPE_NAME_'.mb_strtoupper($type)),
'script' => WebFormScript::getCrmButtonWidget(
$id,
array(
'IS_CALLBACK' => true,
'REMOVE_COPYRIGHT' => $removeCopyright,
'LANGUAGE_ID' => $lang
)
),
'freeze' => WebForm\Manager::isEmbeddingEnabled($id),
'sort' => 200,
'useColors' => true,
'classList' => array('b24-widget-button-' . $type),
'show' => WebFormScript::getCrmButtonWidgetShower(
$id, $lang,
[
'siteButton' => true,
]
),
'hide' => WebFormScript::getCrmButtonWidgetHider($id),
);
$widgets[] = $widget;
return $widgets;
}