You are here

public static function Drupal::moduleHandler in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal.php \Drupal::moduleHandler()
  2. 10 core/lib/Drupal.php \Drupal::moduleHandler()

Returns the module handler.

Return value

\Drupal\Core\Extension\ModuleHandlerInterface

42 calls to Drupal::moduleHandler()
CategorizingPluginManagerTrait::getModuleHandler in core/lib/Drupal/Core/Plugin/CategorizingPluginManagerTrait.php
Returns the module handler used.
comment_post_update_enable_comment_admin_view in core/modules/comment/comment.post_update.php
Enable the comment admin view.
content_moderation_requirements in core/modules/content_moderation/content_moderation.install
Implements hook_requirements().
ContextualLinks::moduleHandler in core/modules/contextual/src/Element/ContextualLinks.php
Wraps the module handler.
dblog_post_update_convert_recent_messages_to_view in core/modules/dblog/dblog.post_update.php
Replace 'Recent log messages' with a view.

... See full list

File

core/lib/Drupal.php, line 517
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function moduleHandler() {
  return static::getContainer()
    ->get('module_handler');
}