You are here

public function TermMachineName::__construct in Taxonomy Machine Name 8

Constructs an \Drupal\views\Plugin\views\argument_validator\Entity object.

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.

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info.

Overrides Entity::__construct

File

src/Plugin/views/argument_validator/TermMachineName.php, line 31

Class

TermMachineName
Validates whether a term machine name is a valid term argument.

Namespace

Drupal\taxonomy_machine_name\Plugin\views\argument_validator

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_manager, $entity_type_bundle_info);

  // Not handling exploding term names.
  $this->multipleCapable = FALSE;
  $this->termStorage = $entity_manager
    ->getStorage('taxonomy_term');
}