You are here

public function InvalidationsServiceInterface::getImmutable in Purge 8.3

Create a new immutable invalidation object of the given type.

Parameters

string $plugin_id: The id of the invalidation type being instantiated.

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.

Return value

\Drupal\purge\Plugin\Purge\Invalidation\ImmutableInvalidationInterface The immutable invalidation object.

Throws

\Drupal\purge\Plugin\Purge\Invalidation\Exception\MissingExpressionException Thrown when plugin defined expression_required = TRUE and when it is instantiated without expression (NULL).

\Drupal\purge\Plugin\Purge\Invalidation\Exception\InvalidExpressionException Exception thrown when plugin got instantiated with an expression that is not deemed valid for the type of invalidation.

1 method overrides InvalidationsServiceInterface::getImmutable()
InvalidationsService::getImmutable in src/Plugin/Purge/Invalidation/InvalidationsService.php
Create a new immutable invalidation object of the given type.

File

src/Plugin/Purge/Invalidation/InvalidationsServiceInterface.php, line 56

Class

InvalidationsServiceInterface
Describes a service that instantiates invalidation objects on-demand.

Namespace

Drupal\purge\Plugin\Purge\Invalidation

Code

public function getImmutable($plugin_id, $expression = NULL);