You are here

public function ProcessorsService::get in Purge 8.3

Get the requested processor instance.

Parameters

string $plugin_id: The plugin ID of the processor you want to retrieve.

Return value

\Drupal\purge\Plugin\Purge\Processor\ProcessorInterface|false The processor plugin or FALSE when it isn't available.

Overrides ProcessorsServiceInterface::get

File

src/Plugin/Purge/Processor/ProcessorsService.php, line 51

Class

ProcessorsService
Provides a service that provides access to loaded processors.

Namespace

Drupal\purge\Plugin\Purge\Processor

Code

public function get($plugin_id) {
  $this
    ->initializePluginInstances();
  foreach ($this as $processor) {
    if ($processor
      ->getPluginId() === $plugin_id) {
      return $processor;
    }
  }
  return FALSE;
}