• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/controller/propertygroups.php
  • Класс: BitrixSaleControllerPropertyGroups
  • Вызов: PropertyGroups::deleteAction
public function deleteAction($id)
{
	global $APPLICATION;

	$orderPropsGroup = new CSaleOrderPropsGroup();

	$r = $this->exists($id);
	if($r->isSuccess())
	{
		if (!$orderPropsGroup->Delete($id))
		{
			if ($ex = $APPLICATION->GetException())
				$r->addError(new Error($ex->GetString(), $ex->GetId()));
			else
				$r->addError(new Error(Loc::getMessage('CONTROLLER_ERROR_DELETE_PROPS_GROUP', ['#ID#'=>$id]),'ERROR_DELETE_PROPS_GROUP'));
		}
	}

	if($r->isSuccess())
	{
		return true;
	}
	else
	{
		$this->addErrors($r->getErrors());
		return null;
	}
}