public function CacheDecoratedDataProvider::view in RESTful 7.2
Read operation.
Parameters
mixed $identifier: The ID of thing being viewed.
Return value
array An array of data for the thing being viewed.
Overrides CrudInterface::view
1 call to CacheDecoratedDataProvider::view()
- CacheDecoratedDataProvider::viewMultiple in src/
Plugin/ resource/ DataProvider/ CacheDecoratedDataProvider.php - Read operation.
File
- src/
Plugin/ resource/ DataProvider/ CacheDecoratedDataProvider.php, line 184 - Contains \Drupal\restful\Plugin\resource\DataProvider\CacheDecoratedDataProvider.
Class
- CacheDecoratedDataProvider
- Class CacheDecoratedDataProvider.
Namespace
Drupal\restful\Plugin\resource\DataProviderCode
public function view($identifier) {
$resource_field_collection = $this->subject
->view($identifier);
if (!$resource_field_collection instanceof ResourceFieldCollectionInterface) {
return NULL;
}
$resource_field_collection
->setContext('cache_fragments', $this
->getCacheFragments($identifier));
return $resource_field_collection;
}