You are here

public function AdminLabelTrait::adminLabel in Views XML Backend 8

Returns a string representing this handler's name in the UI.

Parameters

bool $short: Whether to return a short label.

Return value

string The admin label.

See also

\Drupal\views\Plugin\views\ViewsHandlerInterface::adminLabel()

File

src/AdminLabelTrait.php, line 26
Contains \Drupal\views_xml_backendAdminLabelTrait.

Class

AdminLabelTrait
Helps views plugins display a useful admin label.

Namespace

Drupal\views_xml_backend

Code

public function adminLabel($short = FALSE) {
  if (!empty($this->options['admin_label'])) {
    return $this->options['admin_label'];
  }
  $title = $short && isset($this->definition['title short']) ? $this->definition['title short'] : $this->definition['title'];
  return $this
    ->t('@xpath: @title', [
    '@xpath' => $this->options['xpath_selector'],
    '@title' => $title,
  ]);
}