protected function AdminCreateHtmlRouteProvider::addFormRoute in Entity API 8.0
Returns the add 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 CreateHtmlRouteProvider::addFormRoute
File
- src/
Routing/ AdminCreateHtmlRouteProvider.php, line 30 - Contains \Drupal\entity\Routing\AdminCreateHtmlRouteProvider.
Class
- AdminCreateHtmlRouteProvider
- Provides HTML routes for creating entities using the administrative theme.
Namespace
Drupal\entity\RoutingCode
protected function addFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::addFormRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}