' . t('About') . ''; $output .= '

' . t('Format string and text fields to link to Solr facet searches') . '

'; return $output; default: } } /** * Implements hook_field_formatter_info_alter(). * * Makes the Solr facet formatter available for every field type. The value * sent to the facet search is resolved per field type inside the formatter * (the referenced entity's label for reference fields such as entity_reference * and typed_relation, the field's main property value otherwise), so the facet * is filtered by the human readable value rather than an internal id. */ function solr_facet_field_formatter_field_formatter_info_alter(array &$info) { if (isset($info['solr_facet_text_field_formatter'])) { $field_types = array_keys(\Drupal::service('plugin.manager.field.field_type')->getDefinitions()); $info['solr_facet_text_field_formatter']['field_types'] = $field_types; } }