- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/entity/entityeditorconfig.php
- Класс: Bitrix\Crm\Entity\EntityEditorConfig
- Вызов: EntityEditorConfig::set
public function set(array $data)
{
if(empty($data))
{
throw new Main\ArgumentException("Must be not empty array.", "data");
}
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 ( // compatibility mode
is_array($data) &&
isset($data[0]['type']) &&
$data[0]['type'] === 'section'
)
{
$data = [
[
'name' => 'default_column',
'type' => 'column',
'elements' => $data
]
];
}
$this->configuration->set(
$this->getConfigId(),
$data,
[
'scope' => $this->getScope(),
'userScopeId' => $this->getUserScopeId() ?: null,
]
);
}