You are here

public function DataProviderResource::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/DataProviderResource.php, line 118
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderResource.

Class

DataProviderResource
This data provider creates a resource and uses it to access the data.

Namespace

Drupal\restful\Plugin\resource\DataProvider

Code

public function update($identifier, $object, $replace = FALSE) {
  return $this->referencedDataProvider
    ->update($identifier, $object, $replace);
}