protected function InvalidationsService::createInstance in Purge 8.3
Retrieve a new instance from the plugin manager.
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.
int $id: The numeric identifier of this instance.
Return value
\Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface The invalidation object.
4 calls to InvalidationsService::createInstance()
- InvalidationsService::get in src/Plugin/ Purge/ Invalidation/ InvalidationsService.php 
- Create a new invalidation object of the given type.
- InvalidationsService::getFromQueueData in src/Plugin/ Purge/ Invalidation/ InvalidationsService.php 
- Replicate a invalidation object from serialized queue item data.
- InvalidationsService::getImmutable in src/Plugin/ Purge/ Invalidation/ InvalidationsService.php 
- Create a new immutable invalidation object of the given type.
- InvalidationsService::getImmutableFromQueueData in src/Plugin/ Purge/ Invalidation/ InvalidationsService.php 
- Replicate a immutable invalidation object from serialized queue item data.
File
- src/Plugin/ Purge/ Invalidation/ InvalidationsService.php, line 70 
Class
- InvalidationsService
- Provides a service that instantiates invalidation objects on-demand.
Namespace
Drupal\purge\Plugin\Purge\InvalidationCode
protected function createInstance($plugin_id, $expression, $id) {
  return $this->pluginManager
    ->createInstance($plugin_id, [
    'expression' => $expression,
    'id' => $id,
  ]);
}