class HtmlRouteProvider in Consumers 8
Hierarchy
- class \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider implements EntityHandlerInterface, EntityRouteProviderInterface
- class \Drupal\consumers\Entity\Routing\HtmlRouteProvider
Expanded class hierarchy of HtmlRouteProvider
File
- src/
Entity/ Routing/ HtmlRouteProvider.php, line 9
Namespace
Drupal\consumers\Entity\RoutingView source
class HtmlRouteProvider extends DefaultHtmlRouteProvider {
/**
* {@inheritdoc}
*/
public function getRoutes(EntityTypeInterface $entity_type) {
$collection = parent::getRoutes($entity_type);
$route = new Route($entity_type
->getLinkTemplate('make-default-form'));
$route
->addDefaults([
'_entity_form' => 'consumer.make-default',
'_title_callback' => '\\Drupal\\Core\\Entity\\Controller\\EntityController::title',
])
->setRequirement('_entity_access', 'consumer.update')
->setOption('parameters', [
'consumer' => [
'type' => 'entity:consumer',
],
]);
$collection
->add('entity.consumer.make_default_form', $route);
return $collection;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DefaultHtmlRouteProvider:: |
protected | property | The entity field manager. | |
DefaultHtmlRouteProvider:: |
protected | property | The entity type manager. | |
DefaultHtmlRouteProvider:: |
public static | function |
Instantiates a new instance of this entity handler. Overrides EntityHandlerInterface:: |
1 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the add-form route. | 2 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the add page route. | 2 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the canonical route. | 3 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the collection route. | 2 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the delete-form route. | 1 |
DefaultHtmlRouteProvider:: |
protected | function | Returns the delete multiple form route. | 1 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the edit-form route. | 1 |
DefaultHtmlRouteProvider:: |
protected | function | Gets the type of the ID key for a given entity type. | 1 |
DefaultHtmlRouteProvider:: |
public | function | Constructs a new DefaultHtmlRouteProvider. | 1 |
HtmlRouteProvider:: |
public | function |
Provides routes for entities. Overrides DefaultHtmlRouteProvider:: |