public function CategorizingPluginManagerTrait::getModuleHandler in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Plugin/CategorizingPluginManagerTrait.php \Drupal\Core\Plugin\CategorizingPluginManagerTrait::getModuleHandler()
Returns the module handler used.
Return value
\Drupal\Core\Extension\ModuleHandlerInterface The module handler.
File
- core/
lib/ Drupal/ Core/ Plugin/ CategorizingPluginManagerTrait.php, line 69 - Contains \Drupal\Core\Plugin\CategorizingPluginManagerTrait.
Class
- CategorizingPluginManagerTrait
- Provides a trait for the CategorizingPluginManagerInterface.
Namespace
Drupal\Core\PluginCode
public function getModuleHandler() {
// If the class has an injected module handler, use it. Otherwise fall back
// to fetch it from the service container.
if (isset($this->moduleHandler)) {
return $this->moduleHandler;
}
return \Drupal::moduleHandler();
}