Mercurial > hg > cmmr2012-drupal-site
annotate core/modules/image/src/ImageEffectManager.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\image; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\Core\Cache\CacheBackendInterface; |
Chris@0 | 6 use Drupal\Core\Extension\ModuleHandlerInterface; |
Chris@0 | 7 use Drupal\Core\Plugin\DefaultPluginManager; |
Chris@0 | 8 |
Chris@0 | 9 /** |
Chris@0 | 10 * Manages image effect plugins. |
Chris@0 | 11 * |
Chris@0 | 12 * @see hook_image_effect_info_alter() |
Chris@0 | 13 * @see \Drupal\image\Annotation\ImageEffect |
Chris@0 | 14 * @see \Drupal\image\ConfigurableImageEffectInterface |
Chris@0 | 15 * @see \Drupal\image\ConfigurableImageEffectBase |
Chris@0 | 16 * @see \Drupal\image\ImageEffectInterface |
Chris@0 | 17 * @see \Drupal\image\ImageEffectBase |
Chris@0 | 18 * @see plugin_api |
Chris@0 | 19 */ |
Chris@0 | 20 class ImageEffectManager extends DefaultPluginManager { |
Chris@0 | 21 |
Chris@0 | 22 /** |
Chris@0 | 23 * Constructs a new ImageEffectManager. |
Chris@0 | 24 * |
Chris@0 | 25 * @param \Traversable $namespaces |
Chris@0 | 26 * An object that implements \Traversable which contains the root paths |
Chris@0 | 27 * keyed by the corresponding namespace to look for plugin implementations. |
Chris@0 | 28 * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend |
Chris@0 | 29 * Cache backend instance to use. |
Chris@0 | 30 * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler |
Chris@0 | 31 * The module handler. |
Chris@0 | 32 */ |
Chris@0 | 33 public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) { |
Chris@0 | 34 parent::__construct('Plugin/ImageEffect', $namespaces, $module_handler, 'Drupal\image\ImageEffectInterface', 'Drupal\image\Annotation\ImageEffect'); |
Chris@0 | 35 |
Chris@0 | 36 $this->alterInfo('image_effect_info'); |
Chris@0 | 37 $this->setCacheBackend($cache_backend, 'image_effect_plugins'); |
Chris@0 | 38 } |
Chris@0 | 39 |
Chris@0 | 40 } |