You are here

public function CacheDecoratedResource::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 ResourceDecoratorBase::replace

File

src/Plugin/resource/Decorators/CacheDecoratedResource.php, line 217
Contains \Drupal\restful\Plugin\resource\Decorators\CacheDecoratedResource

Class

CacheDecoratedResource

Namespace

Drupal\restful\Plugin\resource\Decorators

Code

public function replace($path) {
  $this
    ->invalidateResourceCache($path);

  // Update according to the decorated.
  return $this->subject
    ->replace($path);
}