class CampaignMonitorUserRouteProvider in Campaign Monitor 8
Provides routes for the user entity.
Hierarchy
- class \Drupal\campaignmonitor_user\Routing\CampaignMonitorUserRouteProvider
Expanded class hierarchy of CampaignMonitorUserRouteProvider
File
- modules/
campaignmonitor_user/ src/ Routing/ CampaignMonitorUserRouteProvider.php, line 10
Namespace
Drupal\campaignmonitor_user\RoutingView source
class CampaignMonitorUserRouteProvider {
/**
* {@inheritdoc}
*/
public function routes() {
$config = \Drupal::config('campaignmonitor_user.settings');
$routes = [];
// Returns an array of Route objects.
$routes['campaignmonitor.user.subscriptions'] = new Route('/user/campaignmonitor', [
'_controller' => '\\Drupal\\campaignmonitor_user\\Controller\\CampaignMonitorUserController::subscriptionPage',
'_title' => $config
->get('subscription_heading'),
], [
'user' => '\\d+',
'_user_is_logged_in' => 'TRUE',
]);
$routes['campaignmonitor.user.subscriptions_edit'] = new Route('/user/campaignmonitor/{user}/edit', [
'_form' => '\\Drupal\\campaignmonitor_user\\Form\\CampaignMonitorUserSubscriptionForm',
'_title' => $config
->get('subscription_heading'),
], [
'user' => '\\d+',
'_user_is_logged_in' => 'TRUE',
]);
return $routes;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CampaignMonitorUserRouteProvider:: |
public | function |