/** * 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()); } }
/** * Indicates whether the file matching the specified key exists * * @param string $key Identifier to be found * * @return boolean TRUE if the file exists, FALSE otherwise */ public function has($key) { return $this->fileSystem->has($key); }