protected function GroupRouteContextTrait::getEntityTypeManager in Group 8
Same name and namespace in other branches
- 2.0.x src/Context/GroupRouteContextTrait.php \Drupal\group\Context\GroupRouteContextTrait::getEntityTypeManager()
Gets the entity type manager service.
Return value
\Drupal\Core\Entity\EntityTypeManagerInterface The entity type manager service.
File
- src/
Context/ GroupRouteContextTrait.php, line 51
Class
- GroupRouteContextTrait
- Trait to get the group entity from the current route.
Namespace
Drupal\group\ContextCode
protected function getEntityTypeManager() {
if (!$this->entityTypeManager) {
$this->entityTypeManager = \Drupal::entityTypeManager();
}
return $this->entityTypeManager;
}