class AdminCreateHtmlRouteProvider in Entity API 8.0
Provides HTML routes for creating entities using the administrative theme.
Hierarchy
- class \Drupal\entity\Routing\CreateHtmlRouteProvider implements EntityRouteProviderInterface
- class \Drupal\entity\Routing\AdminCreateHtmlRouteProvider
Expanded class hierarchy of AdminCreateHtmlRouteProvider
File
- src/
Routing/ AdminCreateHtmlRouteProvider.php, line 15 - Contains \Drupal\entity\Routing\AdminCreateHtmlRouteProvider.
Namespace
Drupal\entity\RoutingView source
class AdminCreateHtmlRouteProvider extends CreateHtmlRouteProvider {
/**
* {@inheritdoc}
*/
protected function addPageRoute(EntityTypeInterface $entity_type) {
if ($route = parent::addPageRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
/**
* {@inheritdoc}
*/
protected function addFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::addFormRoute($entity_type)) {
$route
->setOption('_admin_route', TRUE);
return $route;
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AdminCreateHtmlRouteProvider:: |
protected | function |
Returns the add form route. Overrides CreateHtmlRouteProvider:: |
|
AdminCreateHtmlRouteProvider:: |
protected | function |
Returns the add page route. Overrides CreateHtmlRouteProvider:: |
|
CreateHtmlRouteProvider:: |
public | function |
Provides routes for entities. Overrides EntityRouteProviderInterface:: |