30 public function delete(): bool
32 if (!isset($this->params[
'block']))
37 $blockId = (int)$this->params[
'block'];
38 $query = BlockTable::query()
39 ->setSelect([
'ID',
'ACCESS'])
40 ->where(
'ID',
'=', $blockId)
41 ->where(
'DELETED',
'=',
'Y')
44 $block = $query->fetch();
47 && $block[
'ACCESS'] === Block::ACCESS_X
50 BlockTable::delete($blockId);
54 return parent::delete();