7fb08b630457bc5fe985f5d83e63dfdf529f077e
[yaffs-website] / web / modules / contrib / simple_sitemap / src / Plugin / simple_sitemap / UrlGenerator / UrlGeneratorManager.php
1 <?php
2
3 namespace Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator;
4
5 use Drupal\Core\Plugin\DefaultPluginManager;
6 use Drupal\Core\Cache\CacheBackendInterface;
7 use Drupal\Core\Extension\ModuleHandlerInterface;
8
9 /**
10  * Class UrlGeneratorManager
11  * @package Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator
12  */
13 class UrlGeneratorManager extends DefaultPluginManager {
14
15   /**
16    * UrlGeneratorManager constructor.
17    * @param \Traversable $namespaces
18    * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
19    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
20    */
21   public function __construct(
22     \Traversable $namespaces,
23     CacheBackendInterface $cache_backend,
24     ModuleHandlerInterface $module_handler
25   ) {
26     parent::__construct(
27       'Plugin/simple_sitemap/UrlGenerator',
28       $namespaces,
29       $module_handler,
30       'Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorInterface',
31       'Drupal\simple_sitemap\Annotation\UrlGenerator'
32     );
33
34     $this->alterInfo('simple_sitemap_url_generators');
35     $this->setCacheBackend($cache_backend, 'simple_sitemap:url_generator');
36   }
37 }