ContextReactionManager.php 726 B

123456789101112131415161718192021
  1. <?php
  2. namespace Drupal\context;
  3. use Traversable;
  4. use Drupal\Core\Plugin\DefaultPluginManager;
  5. use Drupal\Core\Cache\CacheBackendInterface;
  6. use Drupal\Core\Extension\ModuleHandlerInterface;
  7. class ContextReactionManager extends DefaultPluginManager {
  8. /**
  9. * {@inheritdoc}
  10. */
  11. public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  12. parent::__construct('Plugin/ContextReaction', $namespaces, $module_handler, 'Drupal\context\ContextReactionInterface', 'Drupal\context\Reaction\Annotation\ContextReaction');
  13. $this->alterInfo('context_condition_info');
  14. $this->setCacheBackend($cache_backend, 'context_condition_plugins');
  15. }
  16. }