1 | <?php |
||
21 | class Result implements ColumnSettableInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var ArrayObject |
||
25 | */ |
||
26 | protected $columns; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $results; |
||
32 | |||
33 | 11 | public function __construct(array $results, ArrayObject $columns) |
|
38 | |||
39 | /** |
||
40 | * @param FormatterInterface $formatter |
||
41 | * |
||
42 | * @return Result |
||
43 | */ |
||
44 | 3 | public function setFormatter(FormatterInterface $formatter) |
|
52 | |||
53 | /** |
||
54 | * @throws Exception\InvalidArgumentException |
||
55 | * |
||
56 | * @param string|\Soluble\FlexStore\Column\Type\AbstractType $type |
||
57 | * |
||
58 | * @return Result |
||
59 | */ |
||
60 | 1 | public function setType($type) |
|
68 | |||
69 | /** |
||
70 | * @param bool $virtual |
||
71 | * |
||
72 | * @return Result |
||
73 | */ |
||
74 | 1 | public function setVirtual($virtual = true) |
|
82 | |||
83 | /** |
||
84 | * @param bool $excluded |
||
85 | * |
||
86 | * @return Result |
||
87 | */ |
||
88 | 8 | public function setExcluded($excluded = true) |
|
96 | |||
97 | /** |
||
98 | * @param bool $editable |
||
99 | * |
||
100 | * @return Result |
||
101 | */ |
||
102 | 1 | public function setEditable($editable = true) |
|
110 | |||
111 | /** |
||
112 | * @param bool $hidden |
||
113 | * |
||
114 | * @return Result |
||
115 | */ |
||
116 | 1 | public function setHidden($hidden = true) |
|
124 | |||
125 | /** |
||
126 | * @param bool $sortable |
||
127 | * |
||
128 | * @return Result |
||
129 | */ |
||
130 | 1 | public function setSortable($sortable = true) |
|
138 | |||
139 | /** |
||
140 | * @param bool $groupable |
||
141 | * |
||
142 | * @return Result |
||
143 | */ |
||
144 | 1 | public function setGroupable($groupable = true) |
|
152 | |||
153 | /** |
||
154 | * @param bool $filterable |
||
155 | * |
||
156 | * @return Result |
||
157 | */ |
||
158 | 1 | public function setFilterable($filterable = true) |
|
166 | |||
167 | /** |
||
168 | * Set recommended width for the column. |
||
169 | * |
||
170 | * @throws Exception\InvalidArgumentException |
||
171 | * |
||
172 | * @param float|int|string $width |
||
173 | * |
||
174 | * @return Result |
||
175 | */ |
||
176 | 1 | public function setWidth($width) |
|
184 | |||
185 | /** |
||
186 | * Set recommended horizontal align. |
||
187 | * |
||
188 | * @throws Exception\InvalidArgumentException |
||
189 | * |
||
190 | * @param string $align can be left|center|right |
||
191 | * |
||
192 | * @return Column |
||
193 | */ |
||
194 | public function setAlign($align) |
||
200 | |||
201 | /** |
||
202 | * Set recommended css class. |
||
203 | * |
||
204 | * @throws Exception\InvalidArgumentException |
||
205 | * |
||
206 | * @param string $class css class |
||
207 | * |
||
208 | * @return Column |
||
209 | */ |
||
210 | public function setClass($class) |
||
216 | |||
217 | /** |
||
218 | * Set table header for this column. |
||
219 | * |
||
220 | * @throws Exception\InvalidArgumentException |
||
221 | * |
||
222 | * @param string|null $header |
||
223 | * |
||
224 | * @return Result |
||
225 | */ |
||
226 | 1 | public function setHeader($header) |
|
234 | |||
235 | /** |
||
236 | * @return array |
||
237 | */ |
||
238 | 2 | public function toArray() |
|
242 | } |
||
243 |