You are here

public function DomainAccessArgument::title in Domain Access 8

Get the title this argument will assign the view, given the argument.

This usually needs to be overridden to provide a proper title.

Overrides StringArgument::title

File

domain_access/src/Plugin/views/argument/DomainAccessArgument.php, line 17

Class

DomainAccessArgument
Argument handler to find nodes by domain assignment.

Namespace

Drupal\domain_access\Plugin\views\argument

Code

public function title() {
  if ($domain = \Drupal::entityTypeManager()
    ->getStorage('domain')
    ->load($this->argument)) {
    return $domain
      ->label();
  }
  return parent::title();
}