예제 #1
0
 /**
  * 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);
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function postRemove(MediaInterface $media)
 {
     if ($this->filesystem->has($media->getReference())) {
         $this->filesystem->delete($media->getReference());
     }
 }
예제 #3
0
 /**
  * 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);
 }