You are here

public function ConditionBase::summary in GoogleTagManager 8

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

Overrides ConditionInterface::summary

2 calls to ConditionBase::summary()
Domain::summary in src/Plugin/Condition/Domain.php
Provides a human readable summary of the condition's configuration.
Language::summary in src/Plugin/Condition/Language.php
Provides a human readable summary of the condition's configuration.
2 methods override ConditionBase::summary()
Domain::summary in src/Plugin/Condition/Domain.php
Provides a human readable summary of the condition's configuration.
Language::summary in src/Plugin/Condition/Language.php
Provides a human readable summary of the condition's configuration.

File

src/ConditionBase.php, line 208

Class

ConditionBase
Provides a basis for fulfilling contexts for condition plugins.

Namespace

Drupal\google_tag

Code

public function summary() {
  $string = 'The @singular is @adverb@verb "@list".';
  $args = [
    '@singular' => $this->singular,
    '@adverb' => $this
      ->isNegated() ? 'not ' : '',
    '@verb' => count($this->values) > 1 ? 'in' : '',
  ];
  return $this
    ->t(strtr($string, $args), [
    '@list' => implode(', ', $this->values),
  ]);
}