AdminHtmlRouteProvider.php in Drupal 9
File
core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php
View source
<?php
namespace Drupal\Core\Entity\Routing;
use Drupal\Core\Entity\EntityTypeInterface;
class AdminHtmlRouteProvider extends DefaultHtmlRouteProvider {
protected function getAddPageRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getAddPageRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
protected function getAddFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getAddFormRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
protected function getEditFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getEditFormRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
protected function getDeleteFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getDeleteFormRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
protected function getDeleteMultipleFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getDeleteMultipleFormRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
}