function EntityCreationTrait::getEntityTypeManager
Same name in other branches
- 8.x-3.x src/Testing/EntityCreationTrait.php \Drupal\ctools\Testing\EntityCreationTrait::getEntityTypeManager()
Retrieves the Entity Type Manager for the Entity.
Return value
\Drupal\Core\Entity\EntityTypeManager|\Drupal\Core\Entity\EntityTypeManagerInterface|object|null
Throws
\Exception
File
-
src/
Testing/ EntityCreationTrait.php, line 55
Class
- EntityCreationTrait
- Trait used for common entity creation methods.
Namespace
Drupal\ctools\TestingCode
protected function getEntityTypeManager() {
if (!isset($this->entityTypeManager)) {
$this->entityTypeManager = $this->container
->get('entity_type.manager');
}
return $this->entityTypeManager;
}