• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/Controller/Category.php
  • Класс: BitrixCrmMobileControllerCategory
  • Вызов: Category::updateCategoryName
private function updateCategoryName(Factory $factory, int $categoryId, ?string $name): bool
{
	if (!$name || !$factory->isCategoriesEnabled())
	{
		return true;
	}

	$category = $this->getCategoryFromFactory($factory, $categoryId);
	if (!$category)
	{
		return false;
	}

	$category->setName($name);
	$result = $category->save();
	if ($result->isSuccess())
	{
		return true;
	}

	$this->addErrors($result->getErrors());

	return false;
}