You are here

public function RelationController::page in Relation 8

Displays a relation.

Parameters

\Drupal\relation\RelationInterface $relation: The relation to display.

Return value

array An array suitable for drupal_render().

1 string reference to 'RelationController::page'
relation.routing.yml in ./relation.routing.yml
relation.routing.yml

File

src/Controller/RelationController.php, line 26
Contains \Drupal\relation\Controller\RelationController.

Class

RelationController
Returns responses for Relation routes.

Namespace

Drupal\relation\Controller

Code

public function page(RelationInterface $relation) {
  return $this
    ->entityTypeManager()
    ->getViewBuilder('relation')
    ->view($relation);
}