Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/Entity/EntityHandlerBase.php
- 9 core/lib/Drupal/Core/Entity/EntityHandlerBase.php
Namespace
Drupal\Core\Entity
File
core/lib/Drupal/Core/Entity/EntityHandlerBase.php
View source
<?php
namespace Drupal\Core\Entity;
use Drupal\Core\DependencyInjection\DependencySerializationTrait;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
abstract class EntityHandlerBase {
use StringTranslationTrait;
use DependencySerializationTrait;
protected $moduleHandler;
protected function moduleHandler() {
if (!$this->moduleHandler) {
$this->moduleHandler = \Drupal::moduleHandler();
}
return $this->moduleHandler;
}
public function setModuleHandler(ModuleHandlerInterface $module_handler) {
$this->moduleHandler = $module_handler;
return $this;
}
}
Classes