protected function ShipmentRouteProvider::getResendConfirmationFormRoute in Commerce Shipping 8.2
Gets the resend-confirmation-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 ShipmentRouteProvider::getResendConfirmationFormRoute()
- ShipmentRouteProvider::getRoutes in src/
ShipmentRouteProvider.php - Provides routes for entities.
File
- src/
ShipmentRouteProvider.php, line 37
Class
- ShipmentRouteProvider
- Provides routes for the Shipment entity.
Namespace
Drupal\commerce_shippingCode
protected function getResendConfirmationFormRoute(EntityTypeInterface $entity_type) {
$route = new Route($entity_type
->getLinkTemplate('resend-confirmation-form'));
$route
->addDefaults([
'_entity_form' => 'commerce_shipment.resend-confirmation',
'_title_callback' => '\\Drupal\\Core\\Entity\\Controller\\EntityController::title',
])
->setRequirement('_entity_access', 'commerce_order.resend_receipt')
->setRequirement('commerce_order', '\\d+')
->setRequirement('commerce_shipment', '\\d+')
->setOption('parameters', [
'commerce_order' => [
'type' => 'entity:commerce_order',
],
'commerce_shipment' => [
'type' => 'entity:commerce_shipment',
],
])
->setOption('_admin_route', TRUE);
return $route;
}