public static function EntityResourcePostRouteSubscriber::getSubscribedEvents in Drupal 9
Same name and namespace in other branches
- 8 core/modules/rest/src/EventSubscriber/EntityResourcePostRouteSubscriber.php \Drupal\rest\EventSubscriber\EntityResourcePostRouteSubscriber::getSubscribedEvents()
- 10 core/modules/rest/src/EventSubscriber/EntityResourcePostRouteSubscriber.php \Drupal\rest\EventSubscriber\EntityResourcePostRouteSubscriber::getSubscribedEvents()
File
- core/
modules/ rest/ src/ EventSubscriber/ EntityResourcePostRouteSubscriber.php, line 67
Class
- EntityResourcePostRouteSubscriber
- Generates a 'create' route for an entity type if it has a REST POST route.
Namespace
Drupal\rest\EventSubscriberCode
public static function getSubscribedEvents() {
// Priority -10, to run after \Drupal\rest\Routing\ResourceRoutes, which has
// priority 0.
$events[RoutingEvents::DYNAMIC][] = [
'onDynamicRouteEvent',
-10,
];
return $events;
}