Ejemplo n.º 1
0
 /**
  * @ApiDoc(
  *  section="File Manager",
  *  description="Searches for files"
  * )
  *
  * @Rest\QueryParam(name="path", requirements=".+", strict=true, description="The target path")
  * @Rest\QueryParam(name="q", requirements=".*", strict=true, description="Search query")
  * @Rest\QueryParam(name="depth", requirements="[0-9]+", default=1, description="Depth")
  *
  * @Rest\Get("/admin/file/search")
  *
  * @param ParamFetcher $paramFetcher
  *
  * @return array
  */
 public function searchAction(ParamFetcher $paramFetcher)
 {
     $path = $paramFetcher->get('path');
     $q = $paramFetcher->get('q');
     $depth = $paramFetcher->get('depth');
     $files = $this->webFilesystem->search($path, $q, $depth);
     return $this->prepareFiles($files);
 }