You are here

public function ResourcePluginManager::createInstance in RESTful 7.2

Overrides PluginManagerBase::createInstance().

This method is overridden to set the request object when the resource object is instantiated.

File

src/Plugin/ResourcePluginManager.php, line 63
Contains \Drupal\restful\Plugin\ResourcePluginManager.

Class

ResourcePluginManager

Namespace

Drupal\restful\Plugin

Code

public function createInstance($plugin_id, array $configuration = array()) {

  /* @var ResourceInterface $resource */
  $resource = parent::createInstance($plugin_id, $configuration);
  $resource
    ->setRequest($this->request);
  return $resource;
}