• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/controller/category.php
  • Класс: Bitrix\Crm\Controller\Category
  • Вызов: Category::updateAction
public function updateAction(int $entityTypeId, int $id, array $fields): ?array
{
	$factory = $this->getFactory($entityTypeId);
	if (!$factory)
	{
		return null;
	}
	$category = $factory->getCategory($id);
	if (!$category)
	{
		$this->addError(ErrorCode::getNotFoundError());
		return null;
	}

	if (!$this->userPermissions->canUpdateCategory($category))
	{
		$this->addError(ErrorCode::getAccessDeniedError());
		return null;
	}

	return $this->updateCategory($factory, $category, $fields);
}