QuoteSearchContentRebuildAgent::enable

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. QuoteSearchContentRebuildAgent
  4. enable
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/agent/search/quotesearchcontentrebuildagent.php
  • Класс: Bitrix\Crm\Agent\Search\QuoteSearchContentRebuildAgent
  • Вызов: QuoteSearchContentRebuildAgent::enable
public function enable($enable)
{
	if(!is_bool($enable))
	{
		$enable = (bool)$enable;
	}

	if($enable === self::isEnabled())
	{
		return;
	}

	if($enable)
	{
		Option::set('crm', '~CRM_REBUILD_QUOTE_SEARCH_CONTENT', 'Y');
	}
	else
	{
		Option::delete('crm', array('name' => '~CRM_REBUILD_QUOTE_SEARCH_CONTENT'));
	}
	Option::delete('crm', array('name' => '~CRM_REBUILD_QUOTE_SEARCH_CONTENT_PROGRESS'));
}

Добавить комментарий