protected function ProductVariationRouteProvider::getDeleteFormRoute in Commerce Core 8.2
Gets the delete-form route.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
\Symfony\Component\Routing\Route|null The generated route, if available.
Overrides DefaultHtmlRouteProvider::getDeleteFormRoute
File
- modules/
product/ src/ ProductVariationRouteProvider.php, line 61
Class
- ProductVariationRouteProvider
- Provides routes for the product variation entity.
Namespace
Drupal\commerce_productCode
protected function getDeleteFormRoute(EntityTypeInterface $entity_type) {
$route = parent::getDeleteFormRoute($entity_type);
$route
->setDefault('_title_callback', ProductVariationController::class . '::deleteTitle');
$route
->setOption('parameters', [
'commerce_product' => [
'type' => 'entity:commerce_product',
],
'commerce_product_variation' => [
'type' => 'entity:commerce_product_variation',
],
]);
$route
->setOption('_admin_route', TRUE);
return $route;
}