You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
589 B
25 lines
589 B
<?php |
|
|
|
namespace Drupal\dgi_fixity\Routing; |
|
|
|
use Drupal\Core\Entity\EntityTypeInterface; |
|
use Drupal\Core\Entity\Routing\AdminHtmlRouteProvider; |
|
|
|
/** |
|
* Sets defaults on HTML routes for the fixity_check entity. |
|
* |
|
* @see \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider. |
|
*/ |
|
class FixityCheckRouteProvider extends AdminHtmlRouteProvider { |
|
|
|
/** |
|
* {@inheritdoc} |
|
*/ |
|
protected function getCanonicalRoute(EntityTypeInterface $entity_type) { |
|
if ($route = parent::getCanonicalRoute($entity_type)) { |
|
$route->setOption('_admin_route', TRUE); |
|
return $route; |
|
} |
|
} |
|
|
|
}
|
|
|