You are here

public function Resource::update 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 updated.

Overrides ResourceInterface::update

File

src/Plugin/resource/Resource.php, line 391
Contains \Drupal\restful\Plugin\resource\Resource.

Class

Resource

Namespace

Drupal\restful\Plugin\resource

Code

public function update($path) {

  // TODO: Compare this with 1.x logic.
  $object = $this
    ->getRequest()
    ->getParsedBody();
  return $this
    ->getDataProvider()
    ->update($path, $object, FALSE);
}