Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
componentparams.php
1<?php
2
4
7
11final class ComponentParams
12{
13 private Filter $filter;
14
15 public function __construct(Filter $filter)
16 {
17 $this->filter = $filter;
18 }
19
20 public static function get(Filter $filter, array $additionalParams = []): array
21 {
22 return (new self($filter))->getParams($additionalParams);
23 }
24
32 public function getParams(array $additionalParams = []): array
33 {
34 return $additionalParams + [
35 'FILTER_ID' => $this->filter->getID(),
36 'FILTER' => $this->filter->getFieldArrays(),
37 'FILTER_PRESETS' => [],
38 'ENABLE_LABEL' => true,
39 'THEME' => Theme::LIGHT,
40 'CONFIG' => [
41 'AUTOFOCUS' => false,
42 ],
43 // LAZY_LOAD
44 // VALUE_REQUIRED
45 // ENABLE_ADDITIONAL_FILTERS
46 // ENABLE_FIELDS_SEARCH
47 // HEADERS_SECTIONS
48 // MESSAGES
49 // RESET_TO_DEFAULT_MODE
50 // VALUE_REQUIRED_MODE
51 // DISABLE_SEARCH
52 // ENABLE_LIVE_SEARCH
53 // COMPACT_STATE
54 // ENABLE_LABEL
55 // FILTER_PRESETS
56 // FILTER_ROWS
57 // COMMON_PRESETS_ID
58 // RENDER_FILTER_INTO_VIEW
59 // RENDER_FILTER_INTO_VIEW_SORT
60 ];
61 }
62}