• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/controller/action/entity/searchaction.php
  • Класс: Bitrix\Crm\Controller\Action\Entity\SearchAction
  • Вызов: SearchAction::getAffectedCategoriesFromOptions
protected function getAffectedCategoriesFromOptions(array $options): ?array
{
	if (isset($options['categoryId']))
	{
		$categoryId = (int)$options['categoryId'];

		$result = [
			$categoryId
		];
		if (isset($options['extraCategoryIds']) && is_array($options['extraCategoryIds']))
		{
			foreach($options['extraCategoryIds'] as $extraCategoryId)
			{
				$extraCategoryId = (int)$extraCategoryId;
				if ($extraCategoryId >= 0)
				{
					$result[] = $extraCategoryId;
				}
			}
			$result = array_unique($result);
		}

		return $result;
	}

	return null;
}