1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ProcessService.php
См. документацию.
1<?php
2
3namespace Bitrix\Lists\Api\Service\ServiceFactory;
4
5use Bitrix\Lists\Api\Data\IBlockService\IBlockElementFilter;
6use Bitrix\Lists\Api\Data\IBlockService\IBlockListFilter;
7use Bitrix\Lists\Api\Response\ServiceFactory\GetCatalogResponse;
8use Bitrix\Main\Config\Option;
9
10final class ProcessService extends ServiceFactory
11{
12 private static string $iBlockTypeId = '';
13
14 public static function getIBlockTypeId(): string
15 {
16 if (empty(self::$iBlockTypeId))
17 {
18 self::$iBlockTypeId = Option::get('lists', 'livefeed_iblock_type_id', 'bitrix_processes');
19 }
20
21 return self::$iBlockTypeId;
22 }
23
24 protected function fillCatalogFilter(IBlockListFilter $filter): void
25 {
26 $filter->setSite(SITE_ID);
27 }
28
30 {}
31
34
36 {
38
39 $catalogResponse = $this->getAddElementCatalog();
40 $response->fillFromResponse($catalogResponse);
41
42 if ($response->isSuccess())
43 {
44 $catalog = [];
45 foreach ($catalogResponse->getCatalog() as $iBlock)
46 {
47 if (\CLists::getLiveFeed($iBlock['ID']))
48 {
49 $catalog[] = $iBlock;
50 }
51 }
52
53 $response->setCatalog($catalog);
54 }
55
56 return $response;
57 }
58}
fillElementListFilter(IBlockElementFilter $filter)
Определения ProcessService.php:29
fillElementDetailInfoFilter(IBlockElementFilter $filter)
Определения ProcessService.php:32
fillCatalogFilter(IBlockListFilter $filter)
Определения ProcessService.php:24
getAddElementCatalog(?IBlockListFilter $filter=null)
Определения ServiceFactory.php:162
$catalog
Определения iblock_catalog_edit.php:135
$filter
Определения iblock_catalog_list.php:54
$response
Определения result.php:21
const SITE_ID
Определения sonet_set_content_view.php:12