You are here

public function Domain::__construct in GoogleTagManager 8

Constructs a domain condition plugin.

Parameters

\Drupal\domain\DomainNegotiator $domain_negotiator: The domain negotiator service.

\Drupal\Core\Entity\EntityStorageInterface $storage_manager: The entity storage manager.

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Overrides ConditionBase::__construct

File

src/Plugin/Condition/Domain.php, line 46

Class

Domain
Provides a 'Domain' condition.

Namespace

Drupal\google_tag\Plugin\Condition

Code

public function __construct(DomainNegotiator $domain_negotiator, EntityStorageInterface $storage_manager, array $configuration, $plugin_id, $plugin_definition) {
  $this->toggle = 'domain_toggle';
  $this->list = 'domain_list';
  $this->singular = 'domain';
  $this->plural = 'domains';
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->domainNegotiator = $domain_negotiator;
  $this->options = array_map('\\Drupal\\Component\\Utility\\Html::escape', $storage_manager
    ->loadOptionsList());
}