protected function NumberPatternRouteProvider::getResetSequenceFormRoute in Commerce Core 8.2
Gets the reset-sequence-form route.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
\Symfony\Component\Routing\Route|null The generated route, if available.
1 call to NumberPatternRouteProvider::getResetSequenceFormRoute()
- NumberPatternRouteProvider::getRoutes in modules/
number_pattern/ src/ NumberPatternRouteProvider.php - Provides routes for entities.
File
- modules/
number_pattern/ src/ NumberPatternRouteProvider.php, line 36
Class
- NumberPatternRouteProvider
- Defines the route provider for number patterns.
Namespace
Drupal\commerce_number_patternCode
protected function getResetSequenceFormRoute(EntityTypeInterface $entity_type) {
$route = new Route($entity_type
->getLinkTemplate('reset-sequence-form'));
$route
->addDefaults([
'_entity_form' => 'commerce_number_pattern.reset-sequence',
'_title' => 'Reset sequence',
])
->setRequirement('_entity_access', 'commerce_number_pattern.reset_sequence')
->setOption('parameters', [
'commerce_number_pattern' => [
'type' => 'entity:commerce_number_pattern',
],
]);
return $route;
}