function EntityResourcePostRouteSubscriber::__construct
Same name in other branches
- 9 core/modules/rest/src/EventSubscriber/EntityResourcePostRouteSubscriber.php \Drupal\rest\EventSubscriber\EntityResourcePostRouteSubscriber::__construct()
- 8.9.x core/modules/rest/src/EventSubscriber/EntityResourcePostRouteSubscriber.php \Drupal\rest\EventSubscriber\EntityResourcePostRouteSubscriber::__construct()
- 10 core/modules/rest/src/EventSubscriber/EntityResourcePostRouteSubscriber.php \Drupal\rest\EventSubscriber\EntityResourcePostRouteSubscriber::__construct()
Constructs a new EntityResourcePostRouteSubscriber instance.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
File
-
core/
modules/ rest/ src/ EventSubscriber/ EntityResourcePostRouteSubscriber.php, line 28
Class
- EntityResourcePostRouteSubscriber
- Generates a 'create' route for an entity type if it has a REST POST route.
Namespace
Drupal\rest\EventSubscriberCode
public function __construct(EntityTypeManagerInterface $entity_type_manager) {
$this->resourceConfigStorage = $entity_type_manager->getStorage('rest_resource_config');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.