• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/update/catalog/mnemoniccode.php
  • Класс: Bitrix\Crm\Update\Catalog\MnemonicCode
  • Вызов: MnemonicCode::getCurrentStatus
protected function getCurrentStatus(): array
{
	$result = [];
	$iblockId = $this->getIblockId();
	$parameters = $this->getOuterParams();
	if ($iblockId === null || empty($parameters))
	{
		return $result;
	}

	$filter = [
		'=IBLOCK_ID' => $iblockId,
		'=CODE' => '',
	];
	switch ($parameters[self::INDEX_ACTION])
	{
		case self::UPDATE_SECTIONS:
			$result = $this->getDefaultProgress((int)IBlock\SectionTable::getCount($filter));
			break;
		case self::UPDATE_ELEMENTS:
			$result = $this->getDefaultProgress((int)IBlock\ElementTable::getCount($filter));
			break;
	}

	return $result;
}