protected AdminHtmlRouteProvider::getAddPageRoute(EntityTypeInterface $entity_type)
Gets the add page route.
Built only for entity types that have bundles.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
\Symfony\Component\Routing\Route|null The generated route, if available.
Overrides DefaultHtmlRouteProvider::getAddPageRoute
File
- core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php, line 22
Class
- AdminHtmlRouteProvider
- Provides HTML routes for entities with administrative add/edit/delete pages.
Namespace
Drupal\Core\Entity\Routing
Code
1 2 3 4 5 6 | protected function getAddPageRoute(EntityTypeInterface $entity_type ) { if ( $route = parent::getAddPageRoute( $entity_type )) { $route ->setOption( '_admin_route' , TRUE); return $route ; } } |
Please login to continue.