class TestFilteredPluginManager in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\TestFilteredPluginManager
- 9 core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\TestFilteredPluginManager
Class that allows testing the trait.
Hierarchy
- class \Drupal\Component\Plugin\PluginManagerBase implements PluginManagerInterface uses DiscoveryTrait
- class \Drupal\Tests\Core\Plugin\TestFilteredPluginManager implements FilteredPluginManagerInterface uses FilteredPluginManagerTrait
Expanded class hierarchy of TestFilteredPluginManager
File
- core/
tests/ Drupal/ Tests/ Core/ Plugin/ FilteredPluginManagerTraitTest.php, line 82
Namespace
Drupal\Tests\Core\PluginView source
class TestFilteredPluginManager extends PluginManagerBase implements FilteredPluginManagerInterface {
use FilteredPluginManagerTrait;
protected $definitions = [];
protected $moduleHandler;
protected $themeManager;
protected $contextHandler;
public function __construct(array $definitions, ModuleHandlerInterface $module_handler, ThemeManagerInterface $theme_manager, ContextHandlerInterface $context_handler) {
$this->definitions = $definitions;
$this->moduleHandler = $module_handler;
$this->themeManager = $theme_manager;
$this->contextHandler = $context_handler;
}
protected function contextHandler() {
return $this->contextHandler;
}
protected function moduleHandler() {
return $this->moduleHandler;
}
protected function themeManager() {
return $this->themeManager;
}
protected function getType() {
return 'the_type';
}
public function getDefinitions() {
return $this->definitions;
}
}