You are here

public function EntityPost::processRoute in Services 8.4

Same name and namespace in other branches
  1. 9.0.x src/Plugin/ServiceDefinition/EntityPost.php \Drupal\services\Plugin\ServiceDefinition\EntityPost::processRoute()

Checks access for the ServiceDefintion.

Parameters

\Symfony\Component\Routing\Route $route: The route match object.

Overrides ServiceDefinitionBase::processRoute

File

src/Plugin/ServiceDefinition/EntityPost.php, line 32

Class

EntityPost
Plugin annotation @ServiceDefinition( id = "entity_post", methods = { "POST" }, translatable = true, response_code = 201, deriver = "\Drupal\services\Plugin\Deriver\EntityPost" )

Namespace

Drupal\services\Plugin\ServiceDefinition

Code

public function processRoute(Route $route) {
  $route
    ->setRequirement('_services_entity_access_create', $this
    ->getDerivativeId());
}