25 public function run(
int $id):
bool
33 $fields = CIBlockProperty::GetByID($id)->Fetch();
36 $this->errorCollection->setError(
43 $iblockId = (int)$fields[
'IBLOCK_ID'];
44 if (!$this->checkWritePermissions($iblockId))
46 $this->errorCollection->setError(
53 $result = CIBlockProperty::Delete($id) !==
false;
56 $ex = $APPLICATION->GetException();
57 if ($ex instanceof CApplicationException)
59 $this->errorCollection->setError(
60 new Error($ex->GetString())
75 private function checkWritePermissions(
int $iblockId):
bool
77 return CIBlockRights::UserHasRightTo($iblockId, $iblockId,
'iblock_edit');
static getMessage($code, $replace=null, $language=null)