public function getDisplayedValue(FieldFacetValue $ffv) { switch ($ffv->getFieldFacet()->getType()) { case FieldFacet::FLOAT_TYPE: return $ffv->getFloatValue(); case FieldFacet::DATE_TYPE: return $ffv->getDateValue()->format($this->translator->trans('date_form_datepicker_php', array(), 'platform')); case FieldFacet::STRING_TYPE: return $ffv->getStringValue(); default: return "error"; } }
public function getDisplayedValue(FieldFacetValue $ffv) { switch ($ffv->getFieldFacet()->getType()) { case FieldFacet::FLOAT_TYPE: return $ffv->getFloatValue(); case FieldFacet::DATE_TYPE: return $ffv->getDateValue()->format($this->translator->trans('date_form_datepicker_php', [], 'platform')); case FieldFacet::STRING_TYPE || FieldFacet::COUNTRY_TYPE || FieldFacet::SELECT_TYPE || FieldFacet::RADIO_TYPE || FieldFacet::EMAIL_TYPE: return $ffv->getStringValue(); case FieldFacet::CHECKBOXES_TYPE: return $ffv->getArrayValue(); default: return 'error'; } }