class PluginManager
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/lazy_route_provider_install_test/src/PluginManager.php \Drupal\lazy_route_provider_install_test\PluginManager
- 10 core/modules/system/tests/modules/lazy_route_provider_install_test/src/PluginManager.php \Drupal\lazy_route_provider_install_test\PluginManager
- 8.9.x core/modules/system/tests/modules/lazy_route_provider_install_test/src/PluginManager.php \Drupal\lazy_route_provider_install_test\PluginManager
Hierarchy
- class \Drupal\Component\Plugin\PluginManagerBase implements \Drupal\Component\Plugin\PluginManagerInterface uses \Drupal\Component\Plugin\Discovery\DiscoveryTrait
- class \Drupal\Core\Plugin\DefaultPluginManager implements \Drupal\Component\Plugin\PluginManagerInterface, \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface, \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait, \Drupal\Core\Cache\UseCacheBackendTrait extends \Drupal\Component\Plugin\PluginManagerBase
- class \Drupal\lazy_route_provider_install_test\PluginManager extends \Drupal\Core\Plugin\DefaultPluginManager
- class \Drupal\Core\Plugin\DefaultPluginManager implements \Drupal\Component\Plugin\PluginManagerInterface, \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface, \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait, \Drupal\Core\Cache\UseCacheBackendTrait extends \Drupal\Component\Plugin\PluginManagerBase
Expanded class hierarchy of PluginManager
2 string references to 'PluginManager'
- ConfigEntityBaseUnitTest::testSleepWithPluginCollections in core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityBaseUnitTest.php - @covers ::__sleep[[api-linebreak]]
- lazy_route_provider_install_test.services.yml in core/
modules/ system/ tests/ modules/ lazy_route_provider_install_test/ lazy_route_provider_install_test.services.yml - core/modules/system/tests/modules/lazy_route_provider_install_test/lazy_route_provider_install_test.services.yml
1 service uses PluginManager
- plugin.manager.lazy_route_provider_install_test in core/
modules/ system/ tests/ modules/ lazy_route_provider_install_test/ lazy_route_provider_install_test.services.yml - \Drupal\lazy_route_provider_install_test\PluginManager
File
-
core/
modules/ system/ tests/ modules/ lazy_route_provider_install_test/ src/ PluginManager.php, line 12
Namespace
Drupal\lazy_route_provider_install_testView source
class PluginManager extends DefaultPluginManager {
/**
* PluginManager constructor.
*
* This plugin manager depends on the URL generator to ensure that this
* service is instantiated during module installation when the plugin caches
* are cleared.
*
* @param \Traversable $namespaces
* An object that implements \Traversable which contains the root paths
* keyed by the corresponding namespace to look for plugin implementations.
* @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
* A cache backend.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
* @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
* The URL generator.
*/
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, UrlGeneratorInterface $url_generator) {
// Generate a URL during construction to prove that URL generation works. If
// the route was missing an exception would be thrown. This also forces the
// route provider to be initialized very early during a module install.
\Drupal::state()->set(__CLASS__, Url::fromRoute('system.admin')->toString());
parent::__construct('Plugin/LazyRouteProviderInstallTest', $namespaces, $module_handler, NULL, PluginID::class);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.