You are here

protected function EntityHandlerBase::moduleHandler in Drupal 10

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

Gets the module handler.

Return value

\Drupal\Core\Extension\ModuleHandlerInterface The module handler.

14 calls to EntityHandlerBase::moduleHandler()
BlockViewBuilder::viewMultiple in core/modules/block/src/BlockViewBuilder.php
Builds the render array for the provided entities.
ContentEntityStorageBase::createRevision in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Creates a new revision starting off from the specified entity object.
ContentEntityStorageBase::invokeStorageLoadHook in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Invokes hook_entity_storage_load().
ContentEntityStorageBase::preLoad in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Gathers entities from a 'preload' step.
EntityAccessControlHandler::access in core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php
Checks access to an operation on a given entity or entity translation.

... See full list

File

core/lib/Drupal/Core/Entity/EntityHandlerBase.php, line 31

Class

EntityHandlerBase
Provides a base class for entity handlers.

Namespace

Drupal\Core\Entity

Code

protected function moduleHandler() {
  if (!$this->moduleHandler) {
    $this->moduleHandler = \Drupal::moduleHandler();
  }
  return $this->moduleHandler;
}