1 | <?php |
||
28 | class DateRangeFacet extends AbstractFacet |
||
29 | { |
||
30 | const TYPE_DATE_RANGE = 'dateRange'; |
||
31 | |||
32 | /** |
||
33 | * String |
||
34 | * @var string |
||
35 | */ |
||
36 | protected static $type = self::TYPE_DATE_RANGE; |
||
37 | |||
38 | /** |
||
39 | * @var DateRange |
||
40 | */ |
||
41 | protected $range; |
||
42 | |||
43 | /** |
||
44 | * OptionsFacet constructor |
||
45 | * |
||
46 | * @param SearchResultSet $resultSet |
||
47 | * @param string $name |
||
48 | * @param string $field |
||
49 | * @param string $label |
||
50 | * @param array $configuration Facet configuration passed from typoscript |
||
51 | */ |
||
52 | 2 | public function __construct(SearchResultSet $resultSet, $name, $field, $label = '', array $configuration = []) |
|
56 | |||
57 | /** |
||
58 | * @param DateRange $range |
||
59 | */ |
||
60 | 2 | public function setRange(DateRange $range) |
|
64 | |||
65 | /** |
||
66 | * @return DateRange |
||
67 | */ |
||
68 | 2 | public function getRange() |
|
72 | |||
73 | |||
74 | /** |
||
75 | * Get facet partial name used for rendering the facet |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | 1 | public function getPartialName() |
|
83 | |||
84 | /** |
||
85 | * Since the DateRange contains only one or two items when return a collection with the range only to |
||
86 | * allow to render the date range as other facet items. |
||
87 | * |
||
88 | * @return AbstractFacetItemCollection |
||
89 | */ |
||
90 | public function getAllFacetItems() |
||
94 | } |
||
95 |