class RouteSubscriber 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
- 8 modules/mailchimp_ecommerce_commerce/src/Routing/RouteSubscriber.php \Drupal\mailchimp_ecommerce_commerce\Routing\RouteSubscriber
Listens to the dynamic route events.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\mailchimp_ecommerce_commerce\Routing\RouteSubscriber
Expanded class hierarchy of RouteSubscriber
1 string reference to 'RouteSubscriber'
- mailchimp_ecommerce_commerce.services.yml in modules/
mailchimp_ecommerce_commerce/ mailchimp_ecommerce_commerce.services.yml - modules/mailchimp_ecommerce_commerce/mailchimp_ecommerce_commerce.services.yml
1 service uses RouteSubscriber
- mailchimp_ecommerce_commerce.route_subscriber in modules/
mailchimp_ecommerce_commerce/ mailchimp_ecommerce_commerce.services.yml - \Drupal\mailchimp_ecommerce_commerce\Routing\RouteSubscriber
File
- modules/
mailchimp_ecommerce_commerce/ src/ Routing/ RouteSubscriber.php, line 16 - Contains \Drupal\mailchimp_ecommerce_commerce\Routing\RouteSubscriber.
Namespace
Drupal\mailchimp_ecommerce_commerce\RoutingView source
class RouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('mailchimp_ecommerce.admin_settings')) {
$route
->setDefault('_form', '\\Drupal\\mailchimp_ecommerce_commerce\\Form\\MailchimpEcommerceCommerceAdminSettings');
}
if ($route = $collection
->get('mailchimp_ecommerce.sync')) {
$route
->setDefault('_form', '\\Drupal\\mailchimp_ecommerce_commerce\\Form\\MailchimpEcommerceCommerceSync');
}
if ($route = $collection
->get('mailchimp_ecommerce.sync_orders')) {
$route
->setDefault('_form', '\\Drupal\\mailchimp_ecommerce_commerce\\Form\\MailchimpEcommerceCommerceSyncOrders');
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RouteSubscriber:: |
protected | function |
Alters existing routes for a specific collection. Overrides RouteSubscriberBase:: |
|
RouteSubscriberBase:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | 5 |
RouteSubscriberBase:: |
public | function | Delegates the route altering to self::alterRoutes(). | 1 |