public function NumberPatternRouteProvider::getRoutes in Commerce Core 8.2
Provides routes for entities.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type
Return value
\Symfony\Component\Routing\RouteCollection|\Symfony\Component\Routing\Route[] Returns a route collection or an array of routes keyed by name, like route_callbacks inside 'routing.yml' files.
Overrides DefaultHtmlRouteProvider::getRoutes
File
- modules/
number_pattern/ src/ NumberPatternRouteProvider.php, line 17
Class
- NumberPatternRouteProvider
- Defines the route provider for number patterns.
Namespace
Drupal\commerce_number_patternCode
public function getRoutes(EntityTypeInterface $entity_type) {
$collection = parent::getRoutes($entity_type);
if ($reset_sequence_form_route = $this
->getResetSequenceFormRoute($entity_type)) {
$collection
->add("entity.commerce_number_pattern.reset_sequence_form", $reset_sequence_form_route);
}
return $collection;
}