function EntityResource::deleteIndividual

Deletes an individual entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The loaded entity.

Return value

\Drupal\jsonapi\ResourceResponse The response.

File

core/modules/jsonapi/src/Controller/EntityResource.php, line 370

Class

EntityResource
Process all entity requests.

Namespace

Drupal\jsonapi\Controller

Code

public function deleteIndividual(EntityInterface $entity) {
  $entity->delete();
  return new ResourceResponse(NULL, 204);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.