function ArgumentPluginBase::summaryName

Same name and namespace in other branches
  1. 11.x core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::summaryName()
  2. 10 core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::summaryName()
  3. 8.9.x core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::summaryName()

Provides the name to use for the summary, defaults to the name field.

Parameters

$data: The query results for the row.

File

core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php, line 962

Class

ArgumentPluginBase
Base class for argument (contextual filter) handler plugins.

Namespace

Drupal\views\Plugin\views\argument

Code

public function summaryName($data) {
  $value = (string) $data->{$this->name_alias};
  if ($value === '' && isset($this->definition['empty field name'])) {
    $value = $this->definition['empty field name'];
  }
  return $value;
}

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