Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 7
n/a
0 / 0
CRAP
n/a
0 / 0
PrimaryEntityReferenceLabelFormatter
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3namespace Drupal\primary_entity_reference\Plugin\Field\FieldFormatter;
4
5use Drupal\Core\Field\Attribute\FieldFormatter;
6use Drupal\Core\StringTranslation\TranslatableMarkup;
7use Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceLabelFormatter;
8
9/**
10 * Plugin implementation of the 'primary reference label' formatter.
11 */
12#[FieldFormatter(
13  id: 'primary_entity_reference_label',
14  label: new TranslatableMarkup('Label'),
15  description: new TranslatableMarkup('Display the label of the referenced entities.'),
16  field_types: [
17    'primary_entity_reference',
18  ],
19)]
20class PrimaryEntityReferenceLabelFormatter extends EntityReferenceLabelFormatter {}