You are here

public function ImageAPIOptimizeProcessorManager::__construct in Image Optimize (or ImageAPI Optimize) 8.2

Same name and namespace in other branches
  1. 8.3 src/ImageAPIOptimizeProcessorManager.php \Drupal\imageapi_optimize\ImageAPIOptimizeProcessorManager::__construct()
  2. 4.x src/ImageAPIOptimizeProcessorManager.php \Drupal\imageapi_optimize\ImageAPIOptimizeProcessorManager::__construct()

Constructs a new ImageAPIOptimizeProcessorManager.

Parameters

\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

Overrides DefaultPluginManager::__construct

File

src/ImageAPIOptimizeProcessorManager.php, line 34

Class

ImageAPIOptimizeProcessorManager
Manages image optimize processor plugins.

Namespace

Drupal\imageapi_optimize

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  parent::__construct('Plugin/ImageAPIOptimizeProcessor', $namespaces, $module_handler, 'Drupal\\imageapi_optimize\\ImageAPIOptimizeProcessorInterface', 'Drupal\\imageapi_optimize\\Annotation\\ImageAPIOptimizeProcessor');
  $this
    ->alterInfo('imageapi_optimize_processor_info');
  $this
    ->setCacheBackend($cache_backend, 'imageapi_optimize_processor_plugins');
}