You are here

public function RequestDomain::summary in Context 8.4

Provides a human readable summary of the condition's configuration.

Overrides ConditionInterface::summary

File

src/Plugin/Condition/RequestDomain.php, line 73

Class

RequestDomain
Provides a 'Request domain' condition.

Namespace

Drupal\context\Plugin\Condition

Code

public function summary() {
  $domains = array_map('trim', explode("\n", $this->configuration['domains']));
  $domains = implode(', ', $domains);
  if (!empty($this->configuration['negate'])) {
    return $this
      ->t('Do not return true on the following domains: @domains', [
      '@domains' => $domains,
    ]);
  }
  return $this
    ->t('Return true on the following domains: @domains', [
    '@domains' => $domains,
  ]);
}