1
0
mirror of synced 2024-11-27 07:46:09 +03:00
bitrix-module/intaro.retailcrm/classes/general/consultant/RetailCrmOnlineConsultant.php

41 lines
917 B
PHP
Raw Normal View History

2020-11-24 12:14:26 +03:00
<?php
/**
* @category RetailCRM
* @package RetailCRM\Consultant
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT
* @link http://retailcrm.ru
* @see http://retailcrm.ru/docs
*/
/**
* Class RetailCrmOnlineConsultant
*
* @category RetailCRM
* @package RetailCRM\Consultant
2020-11-24 12:14:26 +03:00
*/
class RetailCrmOnlineConsultant
{
/**
* Add a script of online consultant
*
* @return bool
*/
public static function add()
{
$request = \Bitrix\Main\Context::getCurrent()->getRequest();
if (RetailcrmConfigProvider::isOnlineConsultantEnabled() && $request->isAdminSection() !== true) {
2020-11-24 12:14:26 +03:00
\Bitrix\Main\Page\Asset::getInstance()->addString(
RetailcrmConfigProvider::getOnlineConsultantScript(),
true
);
return true;
} else {
return false;
}
}
}