You are here

public function Domain::summaryTitle in Domain Access 8

Returns the summary of the settings in the display.

Overrides AccessPluginBase::summaryTitle

File

domain/src/Plugin/views/access/Domain.php, line 99

Class

Domain
Access plugin that provides domain-based access control.

Namespace

Drupal\domain\Plugin\views\access

Code

public function summaryTitle() {
  $count = count($this->options['domain']);
  if ($count < 1) {
    return $this
      ->t('No domain(s) selected');
  }
  elseif ($count > 1) {
    return $this
      ->t('Multiple domains');
  }
  else {
    $domains = $this->domainStorage
      ->loadOptionsList();
    $domain = reset($this->options['domain']);
    return $domains[$domain];
  }
}