You are here

private function HierarchicalFormatter::displayOptions in Hierarchical Term Formatter 8

Returns a list of supported display options.

Return value

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

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

File

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

Class

HierarchicalFormatter
Plugin implementation of the 'rating' formatter.

Namespace

Drupal\hierarchical_term_formatter\Plugin\Field\FieldFormatter

Code

private function displayOptions() {
  return [
    'all' => $this
      ->t('The selected term and all of its parents'),
    'parents' => $this
      ->t('Just the parent terms'),
    'root' => $this
      ->t('Just the topmost/root term'),
    'nonroot' => $this
      ->t('Any non-topmost/root terms'),
    'leaf' => $this
      ->t('Just the selected term'),
  ];
}