You are here

public function ResourceDecoratorBase::setRequest in RESTful 7.2

Sets the request object.

Parameters

RequestInterface $request: The request object.

Overrides ResourceInterface::setRequest

3 calls to ResourceDecoratorBase::setRequest()
ResourceDecoratorBase::doDelete in src/Plugin/resource/Decorators/ResourceDecoratorBase.php
Shorthand method to perform a quick DELETE request.
ResourceDecoratorBase::doGet in src/Plugin/resource/Decorators/ResourceDecoratorBase.php
Shorthand method to perform a quick GET request.
ResourceDecoratorBase::doWrite in src/Plugin/resource/Decorators/ResourceDecoratorBase.php

File

src/Plugin/resource/Decorators/ResourceDecoratorBase.php, line 98
Contains \Drupal\restful\Plugin\resource\Decorators\ResourceDecoratorBase.

Class

ResourceDecoratorBase
Class ResourceDecoratorBase.

Namespace

Drupal\restful\Plugin\resource\Decorators

Code

public function setRequest(RequestInterface $request) {
  $this->subject
    ->setRequest($request);

  // Make sure that the request is updated in the data provider.
  $this
    ->getDataProvider()
    ->setRequest($request);
}