Display a listing of the Files.

@param Request $request

@return Response
423743
public function index()
    {
        $result = $this->repository->paginated();

        return view('cms::modules.files.index')
            ->with('files', $result)
            ->with('pagination', $result->render());
    }
796907
public function index(Request $request)
    {
        $rows = $this->noticiaRepo->findAndPaginate($request);
        $categorias = $this->categoriaRepo->listPub();

        return view('admin.noticias.list', compact('rows','categorias'));
    }
1158134
public static function requestHasFiles(Request $request) : bool
    {
        return ($request && $request->allFiles() && count($request->allFiles()) > 0);
    }
643788
public function listAction(Request $request): Response
    {
        $page = $request->query->get('page') ?? 1;

        $pagerfanta = new Pagerfanta(
            new ArrayAdapter($this->sectionService->loadSections())
        );

        $pagerfanta->setMaxPerPage($this->defaultPaginationLimit);
        $pagerfanta->setCurrentPage(min($page, $pagerfanta->getNbPages()));

        /** @var \eZ\Publish\API\Repository\Values\Content\Section[] $sectionList */
        $sectionList = $pagerfanta->getCurrentPageResults();
        $contentCountBySectionId = [];
        $deletableSections = [];
        $assignableSections = [];

        $deleteSectionsForm = $this->formFactory->deleteSections(
            new SectionsDeleteData($this->getSectionsNumbers($sectionList))
        );

        $assignContentForms = $this->formFactory->assignContentSectionForm(
            new SectionContentAssignData()
        );

        foreach ($sectionList as $section) {
            $contentCountBySectionId[$section->id] = $this->sectionService->countAssignedContents($section);
            $deletableSections[$section->id] = !$this->sectionService->isSectionUsed($section);
            $assignableSections[$section->id] = $this->canUserAssignSectionToSomeContent($section);
        }

        return $this->render('@ezdesign/admin/section/list.html.twig', [
            'can_edit' => $this->isGranted(new Attribute('section', 'edit')),
            'can_assign' => $this->isGranted(new Attribute('section', 'assign')),
            'pager' => $pagerfanta,
            'content_count' => $contentCountBySectionId,
            'deletable' => $deletableSections,
            'assignable' => $assignableSections,
            'form_sections_delete' => $deleteSectionsForm->createView(),
            'form_section_content_assign' => $assignContentForms->createView(),
        ]);
    }
630836
public function folder(Request $request)
    {
        $json = [];

        $validator = $this->validatorFolder($request->all())->fails();

        if ($validator) {
            $json['error'] = trans('admin::image.error.folder_alpha_num');
        }

        if (!$json) {
            $dir = '';
            if ($request->get('directory')) {
                $dir = $request->get('directory') . '/';
            }
            $dir .= $request->get('folder');
            $result = $this->storage->makeDirectory($dir);

            if ($result) {
                $json['success'] = trans('admin::image.success.folder');
            } else {
                $json['error'] = trans('admin::image.error.folder');
            }
        }

        return response()
            ->json($json);
    }
946745
public function listElement(Request $request)
    {
        $baseIds = array_keys($this->getAclForUser()->get_granted_base([\ACL::CANADDRECORD]));

        $lazaretFiles = null;
        $perPage = 10;
        $page = max(1, $request->query->get('page', 1));
        $offset = ($page - 1) * $perPage;

        if (count($baseIds) > 0) {
            $lazaretFiles = $this->getLazaretFileRepository()->findPerPage($baseIds, $offset, $perPage);
        }

        return $this->render('prod/upload/lazaret.html.twig', [
            'lazaretFiles' => $lazaretFiles,
            'currentPage'  => $page,
            'perPage'      => $perPage,
        ]);
    }
123980
public function handleFiles(Request &$request)
    {
        $files = $request->files->all();
        if(!empty($files)) {
            $metadata = $this->handlerService->handleFiles($files);
            $request->headers->add(['file-meta-data' => json_encode($metadata)]);
        }
    }
965849
public function indexDataAction(Request $request)
        {

            $aRemoteApps = RemoteAppQuery::create()->find();
            $sResult     = $this->renderView('SlashworksAppBundle:RemoteApp:data.json.twig', array(
                'entities' => $aRemoteApps,
            ));

            $response = new Response($sResult);
            $response->headers->set('Content-Type', 'application/json');

            return $response;

        }
104083
public function apiList(Request $request)
    {
        if (config('cms.api-key') != $request->header('cms')) {
            return app(CmsResponseService::class)->apiResponse('error', []);
        }

        $images =  $this->repository->apiPrepared();

        return app(CmsResponseService::class)->apiResponse('success', $images);
    }
409517
public function indexAction(Request $request)
    {
        $dispatcher = $this->get('event_dispatcher');
        $event = new ResponseEvent($request);
        $dispatcher->dispatch(OpiferMediaEvents::MEDIA_CONTROLLER_INDEX, $event);

        if (null !== $event->getResponse()) {
            return $event->getResponse();
        }

        $providers = $this->get('opifer.media.provider.pool')->getProviders();

        return $this->render($this->container->getParameter('opifer_media.media_index_view'), [
            'providers' => $providers,
        ]);
    }
1193222
public function listAction(Request $request)
    {
        return new JsonResponse(
            $this->finder->search(
                'UJM\ExoBundle\Entity\Item\Item',
                $request->query->all(),
                [Transfer::INCLUDE_SOLUTIONS, Transfer::INCLUDE_ADMIN_META]
            )
        );
    }
1109058
public function listAction(Request $request)
    {
        $this->buildBreadcrumbs($this->getType());

        $file = new File();
        $form = $this->createForm(FileFormType::class, $file);

        $form->handleRequest($request);

        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();

            $em->persist($file);
            $em->flush();

            return $this->redirect($this->generateUrl('clastic_node_list', array(
                'type' => $this->getType(),
            )));
        }

        return $this->render('ClasticMediaBundle:Backoffice:list.html.twig', array(
            'form' => $form->createView(),
            'type' => $this->getType(),
            'module' => $this->get('clastic.module_manager')->getModule($this->getType()),
        ));
    }
944808
public function listLogs(Request $request)
    {
        $stats   = $this->logViewer->statsTable();
        $headers = $stats->header();
        $rows    = $this->paginate($stats->rows(), $request);

        return $this->view('logs', compact('headers', 'rows'));
    }
657744
public function index(Request $request)
    {
        $query = Tag::query();

        if ($request->has('filter.containing')) {
            $query->containing($request['filter']['containing']);
        }

        if ($request->has('filter.type')) {
            $query->where('type', $request['filter']['type']);
        }

        if ($request->has('limit')) {
            $query->limit($request['limit']);
        }

        return $query->get()->map(function (Tag $tag) {
            return $tag->name;
        });
    }
431283
public function listMediaAction(Request $request)
    {
        if (!$request->isXmlHttpRequest()) {
            throw new NotFoundHttpException();
        }

        $folder = $this->findFolderById($request->attributes->get('id'));

        $medias = $this
            ->get('ekyna_media.browser')
            ->setFolder($folder)
            ->findMedias((array)$request->query->get('types'));

        $data = array('medias' => $medias);

        $response = new Response($this->get('jms_serializer')->serialize(
            $data,
            'json',
            SerializationContext::create()->setGroups(array('Manager'))
        ));

        $response->headers->add(array('Content-Type' => 'application/json'));
        return $response;
    }
882654
public function browseAction(Request $request)
    {
        $response = $this->convertResourceToPlainText(
            $request->getRequestFormat('xml'),
            $this->mapper->getCollection()
        );

        return new Response($response);
    }
1041217
public function listsetsAction(Request $request)
    {
        $fileId = $request->get('file_id');

        $volumeManager = $this->get('phlexible_media_manager.volume_manager');
        $fileMetaSetResolver = $this->get('phlexible_media_manager.file_meta_set_resolver');

        $file = $volumeManager->getByFileId($fileId)->findFile($fileId);
        $metaSets = $fileMetaSetResolver->resolve($file);

        $sets = [];
        foreach ($metaSets as $metaSet) {
            $sets[] = [
                'id' => $metaSet->getId(),
                'name' => $metaSet->getName(),
            ];
        }

        return new JsonResponse(['sets' => $sets]);
    }