Mercurial > hg > isophonics-drupal-site
comparison core/modules/language/src/LanguageNegotiationMethodManager.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\language; | |
4 | |
5 use Drupal\Core\Cache\CacheBackendInterface; | |
6 use Drupal\Core\Extension\ModuleHandlerInterface; | |
7 use Drupal\Core\Plugin\DefaultPluginManager; | |
8 | |
9 /** | |
10 * Manages language negotiation methods. | |
11 */ | |
12 class LanguageNegotiationMethodManager extends DefaultPluginManager { | |
13 | |
14 /** | |
15 * Constructs a new LanguageNegotiationMethodManager object. | |
16 * | |
17 * @param \Traversable $namespaces | |
18 * An object that implements \Traversable which contains the root paths | |
19 * keyed by the corresponding namespace to look for plugin implementations. | |
20 * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend | |
21 * An object that implements CacheBackendInterface | |
22 * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler | |
23 * An object that implements ModuleHandlerInterface | |
24 */ | |
25 public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) { | |
26 parent::__construct('Plugin/LanguageNegotiation', $namespaces, $module_handler, 'Drupal\language\LanguageNegotiationMethodInterface', 'Drupal\language\Annotation\LanguageNegotiation'); | |
27 $this->cacheBackend = $cache_backend; | |
28 $this->cacheKeyPrefix = 'language_negotiation_plugins'; | |
29 $this->cacheKey = 'language_negotiation_plugins'; | |
30 $this->alterInfo('language_negotiation_info'); | |
31 } | |
32 | |
33 } |