public function InvalidationsServiceInterface::get in Purge 8.3
Create a new 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\InvalidationInterface The 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.
\Drupal\purge\Plugin\Purge\Invalidation\Exception\TypeUnsupportedException Thrown when no purgers support the requested type.
1 method overrides InvalidationsServiceInterface::get()
- InvalidationsService::get in src/
Plugin/ Purge/ Invalidation/ InvalidationsService.php - Create a new invalidation object of the given type.
File
- src/
Plugin/ Purge/ Invalidation/ InvalidationsServiceInterface.php, line 34
Class
- InvalidationsServiceInterface
- Describes a service that instantiates invalidation objects on-demand.
Namespace
Drupal\purge\Plugin\Purge\InvalidationCode
public function get($plugin_id, $expression = NULL);