1 | <?php |
||
38 | class SectionModel extends BitrixModel |
||
39 | { |
||
40 | /** |
||
41 | * Corresponding IBLOCK_ID |
||
42 | * |
||
43 | * @var int |
||
44 | */ |
||
45 | const IBLOCK_ID = null; |
||
46 | |||
47 | /** |
||
48 | * Bitrix entity object. |
||
49 | * |
||
50 | * @var object |
||
51 | */ |
||
52 | public static $bxObject; |
||
53 | |||
54 | /** |
||
55 | * Corresponding object class name. |
||
56 | * |
||
57 | * @var string |
||
58 | */ |
||
59 | protected static $objectClass = 'CIBlockSection'; |
||
60 | |||
61 | /** |
||
62 | * Getter for corresponding iblock id. |
||
63 | * |
||
64 | * @throws Exception |
||
65 | * |
||
66 | * @return int |
||
67 | */ |
||
68 | public static function iblockId() |
||
77 | |||
78 | /** |
||
79 | * Instantiate a query object for the model. |
||
80 | * |
||
81 | * @return SectionQuery |
||
82 | */ |
||
83 | public static function query() |
||
87 | |||
88 | /** |
||
89 | * Create new item in database. |
||
90 | * |
||
91 | * @param $fields |
||
92 | * |
||
93 | * @throws Exception |
||
94 | * |
||
95 | * @return static|bool |
||
96 | */ |
||
97 | public static function create($fields) |
||
105 | |||
106 | /** |
||
107 | * Get IDs of direct children of the section. |
||
108 | * Additional filter can be specified. |
||
109 | * |
||
110 | * @param array $filter |
||
111 | * |
||
112 | * @return array |
||
113 | */ |
||
114 | public function getDirectChildren(array $filter = []) |
||
126 | |||
127 | /** |
||
128 | * Get IDs of all children of the section (direct or not). |
||
129 | * Additional filter can be specified. |
||
130 | * |
||
131 | * @param array $filter |
||
132 | * @param array|string $sort |
||
133 | * |
||
134 | * @return array |
||
135 | */ |
||
136 | public function getAllChildren(array $filter = [], $sort = ['LEFT_MARGIN' => 'ASC']) |
||
157 | |||
158 | /** |
||
159 | * Proxy for GetPanelButtons |
||
160 | * |
||
161 | * @param array $options |
||
162 | * @return array |
||
163 | */ |
||
164 | public function getPanelButtons($options = []) |
||
173 | } |
||
174 |