@@ 305-319 (lines=15) @@ | ||
302 | * @param int $id |
|
303 | * @return array |
|
304 | */ |
|
305 | protected static function prepareIBlockElementArrayById($id) |
|
306 | { |
|
307 | $id = (int) $id; |
|
308 | if (!$id) { |
|
309 | return []; |
|
310 | } |
|
311 | ||
312 | if (empty(static::$iblockElementArray[$id])) { |
|
313 | $connection = Application::getConnection(); |
|
314 | $el = $connection->query("SELECT ID, IBLOCK_ID FROM b_iblock_element WHERE ID = {$id}")->fetch(); |
|
315 | static::$iblockElementArray[$id] = $el ? $el : []; |
|
316 | } |
|
317 | ||
318 | return static::$iblockElementArray[$id]; |
|
319 | } |
|
320 | ||
321 | /** |
|
322 | * @param int $id |
|
@@ 325-339 (lines=15) @@ | ||
322 | * @param int $id |
|
323 | * @return array |
|
324 | */ |
|
325 | protected static function prepareIBlockSectionArrayById($id) |
|
326 | { |
|
327 | $id = (int) $id; |
|
328 | if (!$id) { |
|
329 | return []; |
|
330 | } |
|
331 | ||
332 | if (empty(static::$iblockSectionArray[$id])) { |
|
333 | $connection = Application::getConnection(); |
|
334 | $el = $connection->query("SELECT ID, IBLOCK_ID FROM b_iblock_section WHERE ID = {$id}")->fetch(); |
|
335 | static::$iblockSectionArray[$id] = $el ? $el : []; |
|
336 | } |
|
337 | ||
338 | return static::$iblockSectionArray[$id]; |
|
339 | } |
|
340 | ||
341 | /** |
|
342 | * @param string $tableName |