public function Resource::replace in RESTful 7.2
Basic implementation for update.
Parameters
string $path: The resource path.
Return value
array An array of structured data for the thing that was replaced.
Overrides ResourceInterface::replace
File
- src/
Plugin/ resource/ Resource.php, line 400 - Contains \Drupal\restful\Plugin\resource\Resource.
Class
Namespace
Drupal\restful\Plugin\resourceCode
public function replace($path) {
// TODO: Compare this with 1.x logic.
$object = $this
->getRequest()
->getParsedBody();
return $this
->getDataProvider()
->update($path, $object, TRUE);
}