- Модуль: biconnector
- Путь к файлу: ~/bitrix/modules/biconnector/lib/Configuration/Action.php
- Класс: BitrixBiConnectorConfigurationAction
- Вызов: Action::onFinish
static function onFinish(Event $event)
{
$result = [
'CREATE_DOM_LIST' => [],
];
$ratio = $event->getParameter('RATIO');
if ((int)$ratio[self::ENTITY_CODE]['DOWNLOAD_FILE_ID'] > 0)
{
$path = CFile::getPath((int)$ratio[self::ENTITY_CODE]['DOWNLOAD_FILE_ID']);
if ($path)
{
$result['CREATE_DOM_LIST'][] = [
'TAG' => 'a',
'DATA' => [
'attrs' => [
'class' => 'ui-btn ui-btn-lg ui-btn-primary',
'href' => $path,
'download' => htmlspecialcharsbx($ratio[self::ENTITY_CODE]['DOWNLOAD_FILE_NAME']),
],
'text' => Loc::getMessage('BI_CONNECTOR_CONFIGURATION_ACTION_DOWNLOAD_BTN'),
],
];
}
}
if (!empty($ratio[self::ENTITY_CODE]['URL']))
{
$result['CREATE_DOM_LIST'][] = [
'TAG' => 'a',
'DATA' => [
'attrs' => [
'class' => 'ui-btn ui-btn-lg ui-btn-primary',
'href' => $ratio[self::ENTITY_CODE]['URL'],
'target' => '_blank',
],
'text' => Loc::getMessage('BI_CONNECTOR_CONFIGURATION_ACTION_CONNECT_BTN'),
],
];
}
return !empty($result['CREATE_DOM_LIST']) ? $result : [];
}