- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/counter/entitycountersettings.php
- Класс: Bitrix\Crm\Counter\EntityCounterSettings
- Вызов: EntityCounterSettings::checkIfCounterTypeEnabled
public function checkIfCounterTypeEnabled(int $counterType, array $enabledCounterTypes): bool
{
$enabled = in_array($counterType, $enabledCounterTypes, true);
if ($enabled)
{
return true;
}
if (in_array(
$counterType,
[
\Bitrix\Crm\Counter\EntityCounterType::OVERDUE,
\Bitrix\Crm\Counter\EntityCounterType::PENDING,
\Bitrix\Crm\Counter\EntityCounterType::READY_TODO,
]
))
{
return $this->checkIfCounterTypeEnabled(\Bitrix\Crm\Counter\EntityCounterType::CURRENT, $enabledCounterTypes);
}
return false;
}