class ScheduledTaskRouteProvider in Webform Scheduled Tasks 8.2
The scheduled task route provider.
Hierarchy
- class \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider implements EntityHandlerInterface, EntityRouteProviderInterface
- class \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider
- class \Drupal\webform_scheduled_tasks\ScheduledTaskRouteProvider
- class \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider
Expanded class hierarchy of ScheduledTaskRouteProvider
File
- src/
ScheduledTaskRouteProvider.php, line 12
Namespace
Drupal\webform_scheduled_tasksView source
class ScheduledTaskRouteProvider extends AdminHtmlRouteProvider {
/**
* {@inheritdoc}
*/
protected function getAddFormRoute(EntityTypeInterface $entity_type) {
return $this
->upcastWebformParam(parent::getAddFormRoute($entity_type));
}
/**
* {@inheritdoc}
*/
protected function getEditFormRoute(EntityTypeInterface $entity_type) {
return $this
->upcastWebformParam(parent::getEditFormRoute($entity_type));
}
/**
* Upcast a 'webform' route param.
*/
protected function upcastWebformParam(Route $route) {
$route
->setOption('parameters', [
'webform' => [
'type' => 'entity:webform',
],
]);
return $route;
}
}