AdminCreateHtmlRouteProvider.php in Entity API 8.0
File
src/Routing/AdminCreateHtmlRouteProvider.php
View source
<?php
namespace Drupal\entity\Routing;
use Drupal\Core\Entity\EntityTypeInterface;
class AdminCreateHtmlRouteProvider extends CreateHtmlRouteProvider {
protected function addPageRoute(EntityTypeInterface $entity_type) {
if ($route = parent::addPageRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
protected function addFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::addFormRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
}