Пример #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
 /**
  * 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);
 }