public function CacheDecoratedDataProvider::update in RESTful 7.2
Update operation.
Parameters
mixed $identifier: The ID of thing to be updated.
mixed $object: The thing that will be set.
bool $replace: TRUE if the contents of $object will replace $identifier entirely. FALSE if only what is set in $object will replace those properties in $identifier.
Return value
array An array of structured data for the thing that was updated.
Overrides CrudInterface::update
File
- src/
Plugin/ resource/ DataProvider/ CacheDecoratedDataProvider.php, line 217 - Contains \Drupal\restful\Plugin\resource\DataProvider\CacheDecoratedDataProvider.
Class
- CacheDecoratedDataProvider
- Class CacheDecoratedDataProvider.
Namespace
Drupal\restful\Plugin\resource\DataProviderCode
public function update($identifier, $object, $replace = TRUE) {
$this
->clearRenderedCache($this
->getCacheFragments($identifier));
return $this->subject
->update($identifier, $object, $replace);
}