public function EntityDebugController::entityTypeDefinition in Devel 8
Same name and namespace in other branches
- 8.3 src/Controller/EntityDebugController.php \Drupal\devel\Controller\EntityDebugController::entityTypeDefinition()
- 8.2 src/Controller/EntityDebugController.php \Drupal\devel\Controller\EntityDebugController::entityTypeDefinition()
- 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 53
Class
- EntityDebugController
- Controller for devel entity debug.
Namespace
Drupal\devel\ControllerCode
public function entityTypeDefinition(RouteMatchInterface $route_match) {
$output = [];
$entity = $this
->getEntityFromRouteMatch($route_match);
if ($entity instanceof EntityInterface) {
$output = $this->dumper
->exportAsRenderable($entity
->getEntityType());
}
return $output;
}