• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/update/catalog/mnemoniccode.php
  • Класс: Bitrix\Crm\Update\Catalog\MnemonicCode
  • Вызов: MnemonicCode::execute
public function execute(array &$option): bool
{
	$result = Main\Update\Stepper::FINISH_EXECUTION;
	if (
		!ModuleManager::isModuleInstalled('bitrix24')
		|| !Loader::includeModule('iblock')
		|| !Loader::includeModule('catalog')
		|| !Loader::includeModule('crm')
	)
	{
		return $result;
	}

	if (!$this->initialize())
	{
		return $result;
	}

	if (empty($option) || empty($option['count']))
	{
		$option = $this->getCurrentStatus();
	}

	if (empty($option))
	{
		return $result;
	}

	$option = $this->normalizeOptions($option);

	if ($option['count'] > 0)
	{
		$option = $this->createMnemonicCode($option);
	}
	if (!empty($option) && $option['count'] > 0)
	{
		$result = Main\Update\Stepper::CONTINUE_EXECUTION;
	}
	else
	{
		$nextState = $this->getNextState($this->getOuterParams());
		$this->setOuterParams($nextState);
		if (!empty($nextState))
		{
			$result = Main\Update\Stepper::CONTINUE_EXECUTION;
		}
	}

	return $result;
}