• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Entity/Command/Command.php
  • Класс: BitrixImV2EntityCommandCommand
  • Вызов: Command::setModuleRestParams
protected function setModuleRestParams(array $command): array
{
	$command['TITLE'] = '';
	$command['PARAMS'] = '';

	if ($command['MODULE_ID'] === 'rest')
	{
		$this->loadRestLang = true;

		if ($command['BOT_ID'] <= 0 && $command['APP_ID'])
		{
			$res = BitrixRestAppTable::getList([
				'filter' => array('=CLIENT_ID' => $command['APP_ID']),
			]);

			if ($app = $res->fetch())
			{
				$command['CATEGORY'] = !empty($app['APP_NAME'])
					? $app['APP_NAME']
					: (!empty($app['APP_NAME_DEFAULT'])
						? $app['APP_NAME_DEFAULT']
						: $app['CODE']
					)
				;
			}
		}
	}

	return $command;
}