You are here

protected function GeneralEmailFormatter::getDescription in Formatter Suite 8

Returns a brief description of the formatter.

Return value

string Returns a brief translated description of the formatter.

1 call to GeneralEmailFormatter::getDescription()
GeneralEmailFormatter::settingsForm in src/Plugin/Field/FieldFormatter/GeneralEmailFormatter.php
Returns a form to configure settings for the formatter.
1 method overrides GeneralEmailFormatter::getDescription()
GeneralEmailListFormatter::getDescription in src/Plugin/Field/FieldFormatter/GeneralEmailListFormatter.php
Returns a brief description of the formatter.

File

src/Plugin/Field/FieldFormatter/GeneralEmailFormatter.php, line 136

Class

GeneralEmailFormatter
Formats an email address.

Namespace

Drupal\formatter_suite\Plugin\Field\FieldFormatter

Code

protected function getDescription() {
  $isMultiple = $this->fieldDefinition
    ->getFieldStorageDefinition()
    ->isMultiple();
  if ($isMultiple === TRUE) {
    return $this
      ->t("Format email addresses as plain text, or as a \"mailto\" link that starts the user's email application. Multiple field values are shown as a list on one line, bulleted, numbered, or in blocks.");
  }
  return $this
    ->t("Format an email address as plain text, or as a \"mailto\" link that starts the user's email application.");
}