comparison core/lib/Drupal/Core/Condition/ConditionManager.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
6 use Drupal\Core\Cache\CacheBackendInterface; 6 use Drupal\Core\Cache\CacheBackendInterface;
7 use Drupal\Core\Executable\ExecutableManagerInterface; 7 use Drupal\Core\Executable\ExecutableManagerInterface;
8 use Drupal\Core\Executable\ExecutableInterface; 8 use Drupal\Core\Executable\ExecutableInterface;
9 use Drupal\Core\Extension\ModuleHandlerInterface; 9 use Drupal\Core\Extension\ModuleHandlerInterface;
10 use Drupal\Core\Plugin\CategorizingPluginManagerTrait; 10 use Drupal\Core\Plugin\CategorizingPluginManagerTrait;
11 use Drupal\Core\Plugin\Context\ContextAwarePluginManagerTrait;
12 use Drupal\Core\Plugin\DefaultPluginManager; 11 use Drupal\Core\Plugin\DefaultPluginManager;
12 use Drupal\Core\Plugin\FilteredPluginManagerInterface;
13 use Drupal\Core\Plugin\FilteredPluginManagerTrait;
13 14
14 /** 15 /**
15 * A plugin manager for condition plugins. 16 * A plugin manager for condition plugins.
16 * 17 *
17 * @see \Drupal\Core\Condition\Annotation\Condition 18 * @see \Drupal\Core\Condition\Annotation\Condition
18 * @see \Drupal\Core\Condition\ConditionInterface 19 * @see \Drupal\Core\Condition\ConditionInterface
19 * @see \Drupal\Core\Condition\ConditionPluginBase 20 * @see \Drupal\Core\Condition\ConditionPluginBase
20 * 21 *
21 * @ingroup plugin_api 22 * @ingroup plugin_api
22 */ 23 */
23 class ConditionManager extends DefaultPluginManager implements ExecutableManagerInterface, CategorizingPluginManagerInterface { 24 class ConditionManager extends DefaultPluginManager implements ExecutableManagerInterface, CategorizingPluginManagerInterface, FilteredPluginManagerInterface {
24 25
25 use CategorizingPluginManagerTrait; 26 use CategorizingPluginManagerTrait;
26 use ContextAwarePluginManagerTrait; 27 use FilteredPluginManagerTrait;
27 28
28 /** 29 /**
29 * Constructs a ConditionManager object. 30 * Constructs a ConditionManager object.
30 * 31 *
31 * @param \Traversable $namespaces 32 * @param \Traversable $namespaces
39 public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) { 40 public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
40 $this->alterInfo('condition_info'); 41 $this->alterInfo('condition_info');
41 $this->setCacheBackend($cache_backend, 'condition_plugins'); 42 $this->setCacheBackend($cache_backend, 'condition_plugins');
42 43
43 parent::__construct('Plugin/Condition', $namespaces, $module_handler, 'Drupal\Core\Condition\ConditionInterface', 'Drupal\Core\Condition\Annotation\Condition'); 44 parent::__construct('Plugin/Condition', $namespaces, $module_handler, 'Drupal\Core\Condition\ConditionInterface', 'Drupal\Core\Condition\Annotation\Condition');
45 }
46
47 /**
48 * {@inheritdoc}
49 */
50 protected function getType() {
51 return 'condition';
44 } 52 }
45 53
46 /** 54 /**
47 * {@inheritdoc} 55 * {@inheritdoc}
48 */ 56 */