function NodeHooks::__construct

NodeHooks constructor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: The module handler

File

core/modules/node/src/Hook/NodeHooks.php, line 33

Class

NodeHooks
Hook implementations for the node module.

Namespace

Drupal\node\Hook

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, ModuleHandlerInterface $moduleHandler) {
    $this->nodeStorage = $entityTypeManager->getStorage('node');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.