You are here

public function ExampleFormattedField::getLabel in Extra Field 8

Same name and namespace in other branches
  1. 8.2 modules/extra_field_example/src/Plugin/ExtraField/Display/ExampleFormattedField.php \Drupal\extra_field_example\Plugin\ExtraField\Display\ExampleFormattedField::getLabel()

The label of the field.

If applicable, the code has to take care of the translatability.

Return value

string|\Drupal\Core\StringTranslation\TranslatableMarkup The field label.

Overrides ExtraFieldDisplayFormattedBase::getLabel

File

modules/extra_field_example/src/Plugin/ExtraField/Display/ExampleFormattedField.php, line 27

Class

ExampleFormattedField
Example Extra field with formatted output.

Namespace

Drupal\extra_field_example\Plugin\ExtraField\Display

Code

public function getLabel() {
  return $this
    ->t('Three items');
}