EntityEditorConfig::get

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. EntityEditorConfig
  4. get
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/entity/entityeditorconfig.php
  • Класс: Bitrix\Crm\Entity\EntityEditorConfig
  • Вызов: EntityEditorConfig::get
public function get()
{
	if(!Crm\Entity\EntityEditorConfigScope::isDefined($this->scope) ||
		($this->scope === Crm\Entity\EntityEditorConfigScope::PERSONAL && $this->userID <= 0)
	)
	{
		throw new Main\InvalidOperationException("This operation is not permitted at current settings.");
	}

	if(
		$this->getScope() === Crm\Entity\EntityEditorConfigScope::CUSTOM
		&& $this->getUserScopeId()
	)
	{
		$result = Scope::getInstance()->getScopeById($this->getUserScopeId());
	}
	else
	{
		$result = $this->configuration->get($this->getConfigId(), $this->getScope());
	}

	return is_array($result) ? $this->normalize($result) : $result;
}

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