/** * Deletes a record * * @param Number $id ID of record * * @return Response $response Result of the action */ public function deleteAction($id) { if ($this->gaufrette->has($id)) { $this->gaufrette->delete($id); } return parent::deleteAction($id); }
/** * {@inheritdoc} */ public function postRemove(MediaInterface $media) { if ($this->filesystem->has($media->getReference())) { $this->filesystem->delete($media->getReference()); } }
/** * Deletes the file matching the specified key * * @param string $key Identifier to be deleted * * @throws \RuntimeException when cannot read file * * @return boolean */ public function delete($key) { return $this->fileSystem->delete($key); }