| @@ 343-357 (lines=15) @@ | ||
| 340 | * @param int $id |
|
| 341 | * @return array |
|
| 342 | */ |
|
| 343 | protected static function prepareIBlockElementArrayById($id) |
|
| 344 | { |
|
| 345 | $id = (int) $id; |
|
| 346 | if (!$id) { |
|
| 347 | return []; |
|
| 348 | } |
|
| 349 | ||
| 350 | if (empty(static::$iblockElementArray[$id])) { |
|
| 351 | $connection = Application::getConnection(); |
|
| 352 | $el = $connection->query("SELECT ID, IBLOCK_ID FROM b_iblock_element WHERE ID = {$id}")->fetch(); |
|
| 353 | static::$iblockElementArray[$id] = $el ? $el : []; |
|
| 354 | } |
|
| 355 | ||
| 356 | return static::$iblockElementArray[$id]; |
|
| 357 | } |
|
| 358 | ||
| 359 | /** |
|
| 360 | * @param int $id |
|
| @@ 363-377 (lines=15) @@ | ||
| 360 | * @param int $id |
|
| 361 | * @return array |
|
| 362 | */ |
|
| 363 | protected static function prepareIBlockSectionArrayById($id) |
|
| 364 | { |
|
| 365 | $id = (int) $id; |
|
| 366 | if (!$id) { |
|
| 367 | return []; |
|
| 368 | } |
|
| 369 | ||
| 370 | if (empty(static::$iblockSectionArray[$id])) { |
|
| 371 | $connection = Application::getConnection(); |
|
| 372 | $el = $connection->query("SELECT ID, IBLOCK_ID FROM b_iblock_section WHERE ID = {$id}")->fetch(); |
|
| 373 | static::$iblockSectionArray[$id] = $el ? $el : []; |
|
| 374 | } |
|
| 375 | ||
| 376 | return static::$iblockSectionArray[$id]; |
|
| 377 | } |
|
| 378 | ||
| 379 | /** |
|
| 380 | * @param string $tableName |
|