• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/Controller/EntityDetails.php
  • Класс: BitrixCrmMobileControllerEntityDetails
  • Вызов: EntityDetails::getEditorParams
private function getEditorParams(Item $entity): array
{
	$params = [
		'ENABLE_SEARCH_HISTORY' => 'N',
		'ENTITY_TYPE_ID' => $entity->getEntityTypeId(),
		'ENTITY_ID' => $entity->getId(),
	];

	if ($entity->isCategoriesSupported())
	{
		$params['CATEGORY_ID'] = $entity->getCategoryId();
	}

	$categoryId = $this->findInSourceParametersList('categoryId');
	if ($this->findInSourceParametersList('categoryId'))
	{
		$params['CATEGORY_ID'] = (int)($categoryId ?? 0);
	}

	if ($this->isCopyMode())
	{
		$params['COMPONENT_MODE'] = ComponentMode::COPING;
	}

	$this->prepareEditorConversionParams($params, $entity->getEntityTypeId());

	$contactId = $this->findInSourceParametersList('contact_id');
	if ($contactId)
	{
		$params['DEFAULT_CONTACT_ID'] = $contactId;
	}

	$phone = $this->findInSourceParametersList('phone');
	if ($phone)
	{
		$params['DEFAULT_PHONE_VALUE'] = $phone;
	}

	$originId = $this->findInSourceParametersList('origin_id');
	if ($originId)
	{
		$params['ORIGIN_ID'] = $originId;
	}

	return $params;
}