class AdminHtmlRouteProvider in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider
Provides HTML routes for entities with administrative edit/delete pages.
Use this class if the edit and delete form routes should use the administrative theme.
@internal
Hierarchy
- class \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider implements EntityHandlerInterface, EntityRouteProviderInterface
- class \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider
Expanded class hierarchy of AdminHtmlRouteProvider
See also
\Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider.
1 file declares its use of AdminHtmlRouteProvider
- FeedHtmlRouteProvider.php in core/
modules/ aggregator/ src/ FeedHtmlRouteProvider.php - Contains \Drupal\aggregator\FeedHtmlRouteProvider.
File
- core/
lib/ Drupal/ Core/ Entity/ Routing/ AdminHtmlRouteProvider.php, line 22 - Contains \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider.
Namespace
Drupal\Core\Entity\RoutingView source
class AdminHtmlRouteProvider extends DefaultHtmlRouteProvider {
/**
* {@inheritdoc}
*/
protected function getEditFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getEditFormRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
/**
* {@inheritdoc}
*/
protected function getDeleteFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getDeleteFormRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
}