Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
IBlockToGetById.php
1<?php
2
4
6{
7 private int $iBlockId = 0;
8 private bool $needCheckPermissions = true;
9
10 public function __construct(int $iBlockId)
11 {
12 if ($iBlockId > 0)
13 {
14 $this->iBlockId = $iBlockId;
15 }
16 }
17
18 public function getIBlockId(): int
19 {
20 return $this->iBlockId;
21 }
22
23 public function enableCheckPermissions(): static
24 {
25 $this->needCheckPermissions = true;
26
27 return $this;
28 }
29
30 public function disableCheckPermissions(): static
31 {
32 $this->needCheckPermissions = false;
33
34 return $this;
35 }
36
37 public function needCheckPermissions(): bool
38 {
39 return $this->needCheckPermissions;
40 }
41}