if (!
$result instanceof TemplateSwitchable
) { return;
} if ($facet->
getTemplate()) { $result->
setTemplate($facet->
getTemplate());
return;
} $result->
setTemplate($this->
getTypeTemplate($type,
$facet->
getMode(),
$result->
getTemplate()));
} private function getTypeTemplate(string
$type, string
$mode, ?string
$defaultTemplate): ?string
{ switch (true
) { case $type === TypeMappingInterface::TYPE_DATE &&
$mode === ProductAttributeFacet::MODE_RANGE_RESULT:
return 'frontend/listing/filter/facet-date-range.tpl';
case $type === TypeMappingInterface::TYPE_DATE &&
$mode === ProductAttributeFacet::MODE_VALUE_LIST_RESULT:
return 'frontend/listing/filter/facet-date-multi.tpl';