1 | <?php |
||
8 | class SectionModel extends BaseModel |
||
9 | { |
||
10 | /** |
||
11 | * Corresponding IBLOCK_ID |
||
12 | * |
||
13 | * @var int |
||
14 | */ |
||
15 | const IBLOCK_ID = null; |
||
16 | |||
17 | /** |
||
18 | * Corresponding object class name. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected static $objectClass = 'CIBlockSection'; |
||
23 | |||
24 | /** |
||
25 | * Getter for corresponding iblock id. |
||
26 | * |
||
27 | * @throws Exception |
||
28 | * |
||
29 | * @return int |
||
30 | */ |
||
31 | public static function iblockId() |
||
40 | |||
41 | /** |
||
42 | * Instantiate a query object for the model. |
||
43 | * |
||
44 | * @return SectionQuery |
||
45 | */ |
||
46 | public static function query() |
||
50 | |||
51 | /** |
||
52 | * Get IDs of direct children of the section. |
||
53 | * Additional filter can be specified. |
||
54 | * |
||
55 | * @param array $filter |
||
56 | * |
||
57 | * @return array |
||
58 | */ |
||
59 | public function getDirectChildren(array $filter = []) |
||
71 | |||
72 | /** |
||
73 | * Get IDs of all children of the section (direct or not). |
||
74 | * Additional filter can be specified. |
||
75 | * |
||
76 | * @param array $filter |
||
77 | * @param array|string $sort |
||
78 | * |
||
79 | * @return array |
||
80 | */ |
||
81 | public function getAllChildren(array $filter = [], $sort = ['LEFT_MARGIN' => 'ASC']) |
||
102 | } |
||
103 |