You are here

protected function PlainStringFormatter::wrapTagOptions in String field formatter 2.0.x

Return value

string[]|\Drupal\Core\StringTranslation\TranslatableMarkup[]

2 calls to PlainStringFormatter::wrapTagOptions()
PlainStringFormatter::settingsForm in src/Plugin/Field/FieldFormatter/PlainStringFormatter.php
Returns a form to configure settings for the formatter.
PlainStringFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/PlainStringFormatter.php
Returns a short summary for the current formatter settings.

File

src/Plugin/Field/FieldFormatter/PlainStringFormatter.php, line 157

Class

PlainStringFormatter
Plugin implementation of the 'plain_string_formatter' formatter.

Namespace

Drupal\string_field_formatter\Plugin\Field\FieldFormatter

Code

protected function wrapTagOptions() {
  $options = [
    'context' => 'HTML tag',
  ];
  return [
    // Semantic block elements.
    'h1' => $this
      ->t('H1', [], $options),
    'h2' => $this
      ->t('H2', [], $options),
    'h3' => $this
      ->t('H3', [], $options),
    'h4' => $this
      ->t('H4', [], $options),
    'h5' => $this
      ->t('H5', [], $options),
    'h6' => $this
      ->t('H6', [], $options),
    'blockquote' => $this
      ->t('BLOCKQUOTE', [], $options),
    'pre' => $this
      ->t('PRE', [], $options),
    'template' => $this
      ->t('TEMPLATE', [], $options),
    // Semantic inline elements.
    'abbr' => $this
      ->t('ABBR', [], $options),
    'address' => $this
      ->t('ADDRESS', [], $options),
    'cite' => $this
      ->t('CITE', [], $options),
    'code' => $this
      ->t('CODE', [], $options),
    'del' => $this
      ->t('DEL', [], $options),
    'em' => $this
      ->t('EM', [], $options),
    'ins' => $this
      ->t('INS', [], $options),
    'kbd' => $this
      ->t('KBD', [], $options),
    'mark' => $this
      ->t('MARK', [], $options),
    'meter' => $this
      ->t('METER', [], $options),
    'progress' => $this
      ->t('PROGRESS', [], $options),
    'q' => $this
      ->t('Q', [], $options),
    's' => $this
      ->t('S', [], $options),
    'samp' => $this
      ->t('SAMP', [], $options),
    'small' => $this
      ->t('SMALL', [], $options),
    'strong' => $this
      ->t('STRONG', [], $options),
    'sub' => $this
      ->t('SUB', [], $options),
    'sup' => $this
      ->t('SUP', [], $options),
    'time' => $this
      ->t('TIME', [], $options),
    'u' => $this
      ->t('U', [], $options),
    'var' => $this
      ->t('VAR', [], $options),
    // Semantically neutral block elements.
    'div' => $this
      ->t('DIV', [], $options),
    // Semantically neutral inline elements.
    'span' => $this
      ->t('SPAN', [], $options),
  ];
}