You are here

private function HierarchicalFormatter::wrapOptions in Hierarchical Term Formatter 8

Returns a list of supported wrapping options.

Return value

array An array whose keys are wrapper machine names and whose values are their labels.

1 call to HierarchicalFormatter::wrapOptions()
HierarchicalFormatter::settingsForm in src/Plugin/Field/FieldFormatter/HierarchicalFormatter.php
Returns a form to configure settings for the formatter.

File

src/Plugin/Field/FieldFormatter/HierarchicalFormatter.php, line 99

Class

HierarchicalFormatter
Plugin implementation of the 'rating' formatter.

Namespace

Drupal\hierarchical_term_formatter\Plugin\Field\FieldFormatter

Code

private function wrapOptions() {
  return [
    'none' => $this
      ->t('None'),
    'span' => $this
      ->t('@tag elements', [
      '@tag' => '<span>',
    ]),
    'div' => $this
      ->t('@tag elements', [
      '@tag' => '<div>',
    ]),
    'ul' => $this
      ->t('@tag elements surrounded by a @parent_tag', [
      '@tag' => '<li>',
      '@parent_tag' => '<ul>',
    ]),
    'ol' => $this
      ->t('@tag elements surrounded by a @parent_tag', [
      '@tag' => '<li>',
      '@parent_tag' => '<ol>',
    ]),
  ];
}