You are here

public function InvalidationBase::__construct in Purge 8.3

Constructs \Drupal\purge\Plugin\Purge\Invalidation\InvalidationBase.

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.

int $id: Unique integer ID for this object instance (during runtime).

mixed|null $expression: Value - usually string - that describes the kind of invalidation, NULL when the type of invalidation doesn't require $expression. Types usually validate the given expression and throw exceptions for bad input.

Overrides PluginBase::__construct

File

src/Plugin/Purge/Invalidation/InvalidationBase.php, line 37

Class

InvalidationBase
Provides base implementations for the invalidation object.

Namespace

Drupal\purge\Plugin\Purge\Invalidation

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, $id, $expression) {
  parent::__construct([], $plugin_id, $plugin_definition);
  $this->id = $id;
  $this->expression = $expression;
  $this
    ->validateExpression();
}