• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/update/catalog/mnemoniccode.php
  • Класс: Bitrix\Crm\Update\Catalog\MnemonicCode
  • Вызов: MnemonicCode::initialize
protected function initialize(): bool
{
	$this->element = new \CIBlockElement();
	$this->section = new \CIBlockSection();

	if (!$this->normalizeOuterParams())
	{
		return false;
	}

	$parameters = $this->getOuterParams();
	switch ($parameters[self::INDEX_IBLOCK])
	{
		case self::PARENT_IBLOCK:
			$iblockId = Product\Catalog::getDefaultId();
			break;
		case self::OFFER_IBLOCK:
			$iblockId = Product\Catalog::getDefaultOfferId();
			break;
		default:
			$iblockId = null;
			break;
	}
	if ($iblockId === null)
	{
		return false;
	}
	$this->setIblockId($iblockId);

	return true;
}