FeaturesAssignmentMethodManager.php 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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 FeaturesAssignmentMethodManager extends DefaultPluginManager {
  10. /**
  11. * Constructs a new FeaturesAssignmentMethodManager 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/FeaturesAssignment', $namespaces, $module_handler,
  23. 'Drupal\features\FeaturesAssignmentMethodInterface');
  24. $this->alterInfo('features_assignment_info');
  25. $this->setCacheBackend($cache_backend, 'features_assignment_methods');
  26. }
  27. }