You are here

public function Role::__construct in Mass Contact 8

Constructs the role grouping plugin.

Parameters

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.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.

Overrides PluginBase::__construct

File

src/Plugin/MassContact/GroupingMethod/Role.php, line 42

Class

Role
Select users by their role.

Namespace

Drupal\mass_contact\Plugin\MassContact\GroupingMethod

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->configuration += $this
    ->defaultConfiguration();
  assert(in_array($this->configuration['conjunction'], [
    'AND',
    'OR',
  ]));
  $this->entityTypeManager = $entity_type_manager;
}