protected function RouteSubscriber::alterRoutes in Mailchimp E-Commerce 8
Same name in this branch
- 8 modules/mailchimp_ecommerce_ubercart/src/Routing/RouteSubscriber.php \Drupal\mailchimp_ecommerce_ubercart\Routing\RouteSubscriber::alterRoutes()
- 8 modules/mailchimp_ecommerce_commerce/src/Routing/RouteSubscriber.php \Drupal\mailchimp_ecommerce_commerce\Routing\RouteSubscriber::alterRoutes()
Alters existing routes for a specific collection.
Parameters
\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.
Overrides RouteSubscriberBase::alterRoutes
File
- modules/
mailchimp_ecommerce_ubercart/ src/ Routing/ RouteSubscriber.php, line 21 - Contains \Drupal\mailchimp_ecommerce_ubercart\Routing\RouteSubscriber.
Class
- RouteSubscriber
- Listens to the dynamic route events.
Namespace
Drupal\mailchimp_ecommerce_ubercart\RoutingCode
protected function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('mailchimp_ecommerce.admin_settings')) {
$route
->setDefault('_form', '\\Drupal\\mailchimp_ecommerce_ubercart\\Form\\MailchimpEcommerceUbercartAdminSettings');
}
if ($route = $collection
->get('mailchimp_ecommerce.sync')) {
$route
->setDefault('_form', '\\Drupal\\mailchimp_ecommerce_ubercart\\Form\\MailchimpEcommerceUbercartSync');
}
if ($route = $collection
->get('mailchimp_ecommerce.sync_orders')) {
$route
->setDefault('_form', '\\Drupal\\mailchimp_ecommerce_ubercart\\Form\\MailchimpEcommerceUbercartSyncOrders');
}
}