CCrmRestService::onRestServiceBuildDescription

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmRestService
  4. onRestServiceBuildDescription
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmRestService
  • Вызов: CCrmRestService::onRestServiceBuildDescription
static function onRestServiceBuildDescription()
{
	if(!self::$DESCRIPTION)
	{
		$bindings = array();
		// There is one entry point
		$callback = array('CCrmRestService', 'onRestServiceMethod');
		foreach(self::$METHOD_NAMES as $name)
		{
			$bindings[$name] = $callback;
		}

		$bindings[\CRestUtil::PLACEMENTS] = array();
		foreach(\Bitrix\Crm\Integration\Rest\AppPlacement::getAll() as $name)
		{
			if ($name === 'CRM_REQUISITE_AUTOCOMPLETE')
			{
				$bindings[\CRestUtil::PLACEMENTS][$name] = ['options' => ['countries' => 'string']];
			}
			else
			{
				$bindings[\CRestUtil::PLACEMENTS][$name] = [];
			}
		}

		CCrmLeadRestProxy::registerEventBindings($bindings);
		CCrmDealRestProxy::registerEventBindings($bindings);
		CCrmCompanyRestProxy::registerEventBindings($bindings);
		CCrmContactRestProxy::registerEventBindings($bindings);
		CCrmQuoteRestProxy::registerEventBindings($bindings);
		CCrmInvoiceRestProxy::registerEventBindings($bindings);
		CCrmCurrencyRestProxy::registerEventBindings($bindings);
		CCrmProductRestProxy::registerEventBindings($bindings);
		CCrmProductPropertyRestProxy::registerEventBindings($bindings);
		CCrmProductSectionRestProxy::registerEventBindings($bindings);
		CCrmActivityRestProxy::registerEventBindings($bindings);
		CCrmRequisiteRestProxy::registerEventBindings($bindings);
		CCrmRequisiteBankDetailRestProxy::registerEventBindings($bindings);
		CCrmAddressRestProxy::registerEventBindings($bindings);
		CCrmMeasureRestProxy::registerEventBindings($bindings);
		CCrmDealRecurringRestProxy::registerEventBindings($bindings);
		CCrmInvoiceRecurringRestProxy::registerEventBindings($bindings);
		CCrmTimelineCommentRestProxy::registerEventBindings($bindings);
		Service\Container::getInstance()->getRestEventManager()->registerEventBindings($bindings);

		Tracking\Rest::register($bindings);
		WebForm\Embed\Rest::register($bindings);
		\Bitrix\Crm\Controller\CallList::register($bindings);
		\Bitrix\Crm\Activity\Entity\ConfigurableRestApp\EventHandler::register($bindings);

		self::$DESCRIPTION = array('crm' => $bindings);
	}

	return self::$DESCRIPTION;
}

Добавить комментарий