FeaturesGenerationMethodManager.php 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Drupal\features;
  3. use Drupal\Core\Cache\CacheBackendInterface;
  4. use Drupal\Core\Extension\ModuleHandlerInterface;
  5. use Drupal\Core\Plugin\DefaultPluginManager;
  6. /**
  7. * Manages configuration packaging methods.
  8. */
  9. class FeaturesGenerationMethodManager extends DefaultPluginManager {
  10. /**
  11. * Constructs a new FeaturesGenerationMethodManager object.
  12. *
  13. * @param \Traversable $namespaces
  14. * An object that implements \Traversable which contains the root paths
  15. * keyed by the corresponding namespace to look for plugin implementations.
  16. * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
  17. * An object that implements CacheBackendInterface.
  18. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
  19. * An object that implements ModuleHandlerInterface.
  20. */
  21. public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  22. parent::__construct('Plugin/FeaturesGeneration', $namespaces, $module_handler, 'Drupal\features\FeaturesGenerationMethodInterface');
  23. $this->cacheBackend = $cache_backend;
  24. $this->cacheKeyPrefix = 'features_generation_methods';
  25. $this->cacheKey = 'features_generation_methods';
  26. $this->alterInfo('features_generation_info');
  27. }
  28. }