1 | <?php |
||
36 | class FieldCollapsing extends AbstractDeactivatableParameterBuilder implements ParameterBuilder |
||
37 | { |
||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $collapseFieldName = 'variantId'; |
||
42 | |||
43 | /** |
||
44 | * @var bool |
||
45 | */ |
||
46 | protected $expand = false; |
||
47 | |||
48 | /** |
||
49 | * @var int |
||
50 | */ |
||
51 | protected $expandRowCount = 10; |
||
52 | |||
53 | /** |
||
54 | * FieldCollapsing constructor. |
||
55 | * @param bool $isEnabled |
||
56 | * @param string $collapseFieldName |
||
57 | * @param bool $expand |
||
58 | * @param int $expandRowCount |
||
59 | */ |
||
60 | public function __construct($isEnabled, $collapseFieldName = 'variantId', $expand = false, $expandRowCount = 10) |
||
67 | |||
68 | /** |
||
69 | * @return string |
||
70 | */ |
||
71 | public function getCollapseFieldName(): string |
||
75 | |||
76 | /** |
||
77 | * @param string $collapseFieldName |
||
78 | */ |
||
79 | public function setCollapseFieldName(string $collapseFieldName) |
||
83 | |||
84 | /** |
||
85 | * @return boolean |
||
86 | */ |
||
87 | public function getIsExpand(): bool |
||
91 | |||
92 | /** |
||
93 | * @param boolean $expand |
||
94 | */ |
||
95 | public function setExpand(bool $expand) |
||
99 | |||
100 | /** |
||
101 | * @return int |
||
102 | */ |
||
103 | public function getExpandRowCount(): int |
||
107 | |||
108 | /** |
||
109 | * @param int $expandRowCount |
||
110 | */ |
||
111 | public function setExpandRowCount(int $expandRowCount) |
||
115 | |||
116 | /** |
||
117 | * @param Query $query |
||
118 | * @return Query |
||
119 | */ |
||
120 | public function build(Query $query): Query |
||
138 | |||
139 | /** |
||
140 | * @param TypoScriptConfiguration $solrConfiguration |
||
141 | * @return FieldCollapsing |
||
142 | */ |
||
143 | public static function fromTypoScriptConfiguration(TypoScriptConfiguration $solrConfiguration) |
||
156 | |||
157 | /** |
||
158 | * @return FieldCollapsing |
||
159 | */ |
||
160 | public static function getEmpty() |
||
164 | } |