public function CourseWebformEventSubscriber::onRequest in Course 3.x
Same name and namespace in other branches
- 8.3 modules/course_webform/src/EventSubscriber/CourseWebformEventSubscriber.php \Drupal\course_webform\EventSubscriber\CourseWebformEventSubscriber::onRequest()
- 8.2 modules/course_webform/src/EventSubscriber/CourseWebformEventSubscriber.php \Drupal\course_webform\EventSubscriber\CourseWebformEventSubscriber::onRequest()
If the current node is a course object, fulfill it for the current user.
Parameters
GetResponseEvent $event:
File
- modules/
course_webform/ src/ EventSubscriber/ CourseWebformEventSubscriber.php, line 23
Class
Namespace
Drupal\course_webform\EventSubscriberCode
public function onRequest(GetResponseEvent $event) {
$route_match = Drupal::routeMatch();
if ($route_match
->getRouteName() == 'entity.webform.canonical') {
$webform = $route_match
->getParameter('webform');
// Process fulfillment or something
}
}