AdminHtmlRouteProvider::getEditFormRoute

protected AdminHtmlRouteProvider::getEditFormRoute(EntityTypeInterface $entity_type)

Gets the edit-form route.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.

Return value

\Symfony\Component\Routing\Route|null The generated route, if available.

Overrides DefaultHtmlRouteProvider::getEditFormRoute

File

core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php, line 42

Class

AdminHtmlRouteProvider
Provides HTML routes for entities with administrative add/edit/delete pages.

Namespace

Drupal\Core\Entity\Routing

Code

protected function getEditFormRoute(EntityTypeInterface $entity_type) {
  if ($route = parent::getEditFormRoute($entity_type)) {
    $route->setOption('_admin_route', TRUE);
    return $route;
  }
}
doc_Drupal
2016-10-29 08:43:42
Comments
Leave a Comment

Please login to continue.