• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/rest/configuration/entity/status.php
  • Класс: Bitrix\Crm\Integration\Rest\Configuration\Entity\Status
  • Вызов: Status::checkRequiredParams
static function checkRequiredParams($type)
{
	$errorList = [];
	if (!CAllCrmInvoice::installExternalEntities())
	{
		$errorList[] = 'need install external entities crm invoice';
	}

	if (!CCrmQuote::LocalComponentCausedUpdater())
	{
		$errorList[] = 'error quote';
	}

	if (!Loader::IncludeModule('currency'))
	{
		$errorList[] = 'need install module: currency';
	}

	if (!Loader::IncludeModule('catalog'))
	{
		$errorList[] = 'need install module: catalog';
	}

	if (!Loader::IncludeModule('sale'))
	{
		$errorList[] = 'need install module: sale';
	}

	if(!empty($errorList))
	{
		$return = [
			'NEXT' => false,
			'ERROR_ACTION' => $errorList,
			'ERROR_MESSAGES' => Loc::getMessage(
				'CRM_ERROR_CONFIGURATION_'.$type.'_EXCEPTION',
				[
					'#CODE#' => static::ENTITY_CODE
				]
			)
		];
	}
	else
	{
		$return = true;
	}

	return $return;
}