You are here

public function ResourceDecoratorBase::setPluginDefinition in RESTful 7.2

This is a decorated resource, set proxy the request until you reach the annotated resource.

Overrides ResourceInterface::setPluginDefinition

File

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

Class

ResourceDecoratorBase
Class ResourceDecoratorBase.

Namespace

Drupal\restful\Plugin\resource\Decorators

Code

public function setPluginDefinition(array $plugin_definition) {
  $this->subject
    ->setPluginDefinition($plugin_definition);
  if (!empty($plugin_definition['dataProvider'])) {
    $this
      ->getDataProvider()
      ->addOptions($plugin_definition['dataProvider']);
  }
}