You are here

protected function GeneralFileLinkFormatter::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 GeneralFileLinkFormatter::getDescription()
GeneralFileLinkFormatter::settingsForm in src/Plugin/Field/FieldFormatter/GeneralFileLinkFormatter.php
Returns a form to configure settings for the formatter.

File

src/Plugin/Field/FieldFormatter/GeneralFileLinkFormatter.php, line 323

Class

GeneralFileLinkFormatter
Formats a file field as one or more links.

Namespace

Drupal\formatter_suite\Plugin\Field\FieldFormatter

Code

protected function getDescription() {
  $isMultiple = $this->fieldDefinition
    ->getFieldStorageDefinition()
    ->isMultiple();
  if ($isMultiple === TRUE) {
    return $this
      ->t("Format field values as links that show a file name or description, size, and MIME-type icon. Multiple field values are shown as a list on one line, bulleted, numbered, or in blocks.");
  }
  return $this
    ->t("Format a field value as a link that shows a file name or description, size, and MIME-type icon.");
}