Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / image / src / ImageEffectManager.php
1 <?php
2
3 namespace Drupal\image;
4
5 use Drupal\Core\Cache\CacheBackendInterface;
6 use Drupal\Core\Extension\ModuleHandlerInterface;
7 use Drupal\Core\Plugin\DefaultPluginManager;
8
9 /**
10  * Manages image effect plugins.
11  *
12  * @see hook_image_effect_info_alter()
13  * @see \Drupal\image\Annotation\ImageEffect
14  * @see \Drupal\image\ConfigurableImageEffectInterface
15  * @see \Drupal\image\ConfigurableImageEffectBase
16  * @see \Drupal\image\ImageEffectInterface
17  * @see \Drupal\image\ImageEffectBase
18  * @see plugin_api
19  */
20 class ImageEffectManager extends DefaultPluginManager {
21
22   /**
23    * Constructs a new ImageEffectManager.
24    *
25    * @param \Traversable $namespaces
26    *   An object that implements \Traversable which contains the root paths
27    *   keyed by the corresponding namespace to look for plugin implementations.
28    * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
29    *   Cache backend instance to use.
30    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
31    *   The module handler.
32    */
33   public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
34     parent::__construct('Plugin/ImageEffect', $namespaces, $module_handler, 'Drupal\image\ImageEffectInterface', 'Drupal\image\Annotation\ImageEffect');
35
36     $this->alterInfo('image_effect_info');
37     $this->setCacheBackend($cache_backend, 'image_effect_plugins');
38   }
39
40 }