25 public function run(
int $id):
bool
33 $fields = CIBlockProperty::GetByID($id)->Fetch();
36 $this->errorCollection->setError(
37 new Error(Loc::getMessage(
'IBLOCK_CONTROLLER_PROPERTY_ACTION_DELETE_ERROR_NOT_FOUND'))
44 if (!$this->checkWritePermissions(
$iblockId))
46 $this->errorCollection->setError(
47 new Error(Loc::getMessage(
'IBLOCK_CONTROLLER_PROPERTY_ACTION_DELETE_ERROR_ACCESS_DENIED'))
53 $result = CIBlockProperty::Delete($id) !==
false;
57 if ($ex instanceof CApplicationException)
59 $this->errorCollection->setError(
60 new Error($ex->GetString())
75 private function checkWritePermissions(
int $iblockId):
bool