public function CacheDecoratedResource::__construct in RESTful 7.2
Constructs a Drupal\Component\Plugin\PluginBase object.
Parameters
ResourceInterface $subject: The decorated object.
\DrupalCacheInterface $cache_controller: Injected cache manager.
File
- src/
Plugin/ resource/ Decorators/ CacheDecoratedResource.php, line 47 - Contains \Drupal\restful\Plugin\resource\Decorators\CacheDecoratedResource
Class
Namespace
Drupal\restful\Plugin\resource\DecoratorsCode
public function __construct(ResourceInterface $subject, \DrupalCacheInterface $cache_controller = NULL) {
// TODO: Implement the ResourceManager factory to use the CacheDecoratedResource.
$this->subject = $subject;
$this->cacheController = $cache_controller ? $cache_controller : $this
->newCacheObject();
$cache_info = $this
->defaultCacheInfo();
$this->pluginDefinition['renderCache'] = $cache_info;
}