public function Resource::doDelete in RESTful 7.2
Shorthand method to perform a quick DELETE request.
Parameters
string $path: The resource path.
Throws
\Drupal\restful\Exception\BadRequestException When the path is not present.
Overrides ResourceInterface::doDelete
File
- src/
Plugin/ resource/ Resource.php, line 295 - Contains \Drupal\restful\Plugin\resource\Resource.
Class
Namespace
Drupal\restful\Plugin\resourceCode
public function doDelete($path) {
if (!$path) {
throw new BadRequestException('DELETE requires a path. None given.');
}
$this
->setPath($path);
$this
->setRequest(Request::create($this
->versionedUrl($path, array(
'absolute' => FALSE,
)), array(), RequestInterface::METHOD_DELETE));
return $this
->process();
}