Drupal investigation

AuthenticationPluginManager.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Drupal\migrate_plus;
  3. use Drupal\Core\Cache\CacheBackendInterface;
  4. use Drupal\Core\Extension\ModuleHandlerInterface;
  5. use Drupal\Core\Plugin\DefaultPluginManager;
  6. /**
  7. * Provides a plugin manager for authentication handlers.
  8. *
  9. * @see \Drupal\migrate_plus\Annotation\DataFetcher
  10. * @see \Drupal\migrate_plus\DataFetcherPluginBase
  11. * @see \Drupal\migrate_plus\DataFetcherPluginInterface
  12. * @see plugin_api
  13. */
  14. class AuthenticationPluginManager extends DefaultPluginManager {
  15. /**
  16. * Constructs a new AuthenticationPluginManager.
  17. *
  18. * @param \Traversable $namespaces
  19. * An object that implements \Traversable which contains the root paths
  20. * keyed by the corresponding namespace to look for plugin implementations,
  21. * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
  22. * Cache backend instance to use.
  23. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
  24. * The module handler to invoke the alter hook with.
  25. */
  26. public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  27. parent::__construct('Plugin/migrate_plus/authentication', $namespaces, $module_handler, 'Drupal\migrate_plus\AuthenticationPluginInterface', 'Drupal\migrate_plus\Annotation\Authentication');
  28. $this->alterInfo('authentication_info');
  29. $this->setCacheBackend($cache_backend, 'migrate_plus_plugins_authentication');
  30. }
  31. }