function TelephoneLinkFormatter::settingsSummary

Same name in other branches
  1. 9 core/modules/telephone/src/Plugin/Field/FieldFormatter/TelephoneLinkFormatter.php \Drupal\telephone\Plugin\Field\FieldFormatter\TelephoneLinkFormatter::settingsSummary()
  2. 8.9.x core/modules/telephone/src/Plugin/Field/FieldFormatter/TelephoneLinkFormatter.php \Drupal\telephone\Plugin\Field\FieldFormatter\TelephoneLinkFormatter::settingsSummary()
  3. 11.x core/modules/telephone/src/Plugin/Field/FieldFormatter/TelephoneLinkFormatter.php \Drupal\telephone\Plugin\Field\FieldFormatter\TelephoneLinkFormatter::settingsSummary()

Overrides FormatterBase::settingsSummary

File

core/modules/telephone/src/Plugin/Field/FieldFormatter/TelephoneLinkFormatter.php, line 49

Class

TelephoneLinkFormatter
Plugin implementation of the 'telephone_link' formatter.

Namespace

Drupal\telephone\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
    $summary = [];
    $settings = $this->getSettings();
    if (!empty($settings['title'])) {
        $summary[] = $this->t('Link using text: @title', [
            '@title' => $settings['title'],
        ]);
    }
    else {
        $summary[] = $this->t('Link using provided telephone number.');
    }
    return $summary;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.