function EntityDebugController::entityTypeDefinition
Same name in other branches
- 4.x src/Controller/EntityDebugController.php \Drupal\devel\Controller\EntityDebugController::entityTypeDefinition()
Returns the entity type definition of the current entity.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: A RouteMatch object.
Return value
array Array of page elements to render.
File
-
src/
Controller/ EntityDebugController.php, line 60
Class
- EntityDebugController
- Controller for devel entity debug.
Namespace
Drupal\devel\ControllerCode
public function entityTypeDefinition(RouteMatchInterface $route_match) : array {
$entity = $this->getEntityFromRouteMatch($route_match);
if (!$entity instanceof EntityInterface) {
return [];
}
return $this->dumper
->exportAsRenderable($entity->getEntityType());
}