function StringListField::summaryName

Same name in other branches
  1. 9 core/modules/options/src/Plugin/views/argument/StringListField.php \Drupal\options\Plugin\views\argument\StringListField::summaryName()
  2. 8.9.x core/modules/options/src/Plugin/views/argument/StringListField.php \Drupal\options\Plugin\views\argument\StringListField::summaryName()
  3. 11.x core/modules/options/src/Plugin/views/argument/StringListField.php \Drupal\options\Plugin\views\argument\StringListField::summaryName()

Overrides StringArgument::summaryName

File

core/modules/options/src/Plugin/views/argument/StringListField.php, line 74

Class

StringListField
Argument handler for list field to show the human readable name in summary.

Namespace

Drupal\options\Plugin\views\argument

Code

public function summaryName($data) {
    $value = $data->{$this->name_alias};
    // If the list element has a human readable name show it.
    if (isset($this->allowedValues[$value]) && !empty($this->options['summary']['human'])) {
        $value = $this->allowedValues[$value];
    }
    return FieldFilteredMarkup::create($this->caseTransform($value, $this->options['case']));
}

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