You are here

public function EntityResource::delete in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x src/Plugin/rest/resource/EntityResource.php \Drupal\cms_content_sync\Plugin\rest\resource\EntityResource::delete()
  2. 2.0.x src/Plugin/rest/resource/EntityResource.php \Drupal\cms_content_sync\Plugin\rest\resource\EntityResource::delete()

Responds to entity DELETE requests.

Parameters

string $api: The used content sync api

string $entity_type: The name of an entity type

string $entity_bundle: The name of an entity bundle

string $entity_type_version: The version of the entity type

string $entity_uuid: The uuid of an entity

Return value

\Symfony\Component\HttpFoundation\Response A list of entities of the given type and bundle

Throws

\Drupal\cms_content_sync\Exception\SyncException

File

src/Plugin/rest/resource/EntityResource.php, line 246

Class

EntityResource
Provides entity interfaces for Content Sync, allowing Sync Core to request and manipulate entities.

Namespace

Drupal\cms_content_sync\Plugin\rest\resource

Code

public function delete($api, $entity_type, $entity_bundle, $entity_type_version, $entity_uuid) {
  return $this
    ->handleIncomingEntity($api, $entity_type, $entity_bundle, $entity_type_version, [
    'uuid' => $entity_uuid,
    'id' => $entity_uuid,
  ], SyncIntent::ACTION_DELETE);
}