List the entries of the given type.

@param  \Illuminate\Http\Request  $request
@param  \Laravel\Telescope\Contracts\EntriesRepository  $storage
@return \Illuminate\Http\JsonResponse
545166
public function index(Request $request, EntriesRepository $storage)
    {
        return response()->json([
            'entries' => $storage->get(
                $this->entryType(),
                EntryQueryOptions::fromRequest($request)
            ),
            'status' => $this->status(),
        ]);
    }
1363698
public function listAction(Request $request)
    {
        $theme = $request->attributes->get(
            'synapse_theme',
            $this->container->get('synapse')
                ->enableDefaultTheme()
                ->getCurrentTheme()
        );

        $templateCollection = $this->container->get('synapse.template.loader')
            ->retrieveAll(array(
                'scope' => TemplateInterface::GLOBAL_SCOPE,
                'templateTypeId' => $theme->getTemplateTypes()->column('id')
            ))
        ;
        $templateMap = array();
        foreach ($templateCollection as $template) {
            $templateMap[$template->getTemplateType()->getName()][$template->getContentType()->getName()] = $template;
        }

        return $this->render('SynapseAdminBundle:Template:list.html.twig', array(
            'theme' => $theme,
            'content_types' => $this->container->get('synapse.content_type.loader')
                ->retrieveAll(),
            'templates' => $templateMap,
        ));
    }
89210
public function entriesDeleteAction(Request $request)
    {
        $entries = [];
        $serializedEntries = [];
        $entriesParams = $this->decodeIdsString($request, 'Claroline\ClacoFormBundle\Entity\Entry');

        foreach ($entriesParams as $entryParam) {
            if (!$entryParam->isLocked()) {
                $entries[] = $entryParam;
            }
        }
        foreach ($entries as $entry) {
            $this->clacoFormManager->checkEntryEdition($entry);
            $serializedEntries[] = $this->entrySerializer->serialize($entry);
        }
        $this->clacoFormManager->deleteEntries($entries);

        return new JsonResponse($serializedEntries, 200);
    }
416921
public function listActionCustom(Request $request = null)
    {
        $this->admin->checkAccess('list');

        $preResponse = $this->preList($request);
        if (null !== $preResponse) {
            return $preResponse;
        }

        if ($listMode = $request->get('_list_mode')) {
            $this->admin->setListMode($listMode);
        }

        $datagrid = $this->admin->getDatagrid();
        $formView = $datagrid->getForm()->createView();

        return $this->renderWithExtraParams($this->admin->getTemplate('list'), [
            'action' => 'list',
            'form' => $formView,
            'batch_action_forms' => $this->getBatchActionFormViews(),

            'datagrid' => $datagrid,
            'csrf_token' => $this->getCsrfToken('sonata.batch'),
            'export_formats' => $this->admin->getExportFormats(),
        ], null);
    }
105081
public function listAction(Request $request = null)
    {
        if (false === $this->admin->checkAccess('list')) {
            throw new AccessDeniedException();
        }
        $galleryListMode = $request->get('pcode') ? true : false;

        $datagrid = $this->admin->getDatagrid();

        $persistentParameters = $this->admin->getPersistentParameters();

        $formView = $datagrid->getForm()->createView();

        $this->get('twig')->getRuntime(FormRenderer::class)->setTheme($formView, $this->admin->getFilterTheme());

        $tags = $this->getDoctrine()
            ->getRepository(Tag::class)
            ->createQueryBuilder('t')
            ->select('t', 'c')
            ->leftJoin('t.children', 'c') // preload
            ->orderBy('t.path', 'ASC')
            ->getQuery()->getResult();

        $tagAdmin = $this->get('networking_init_cms.admin.tag');

        return $this->render(
            $this->admin->getTemplate('list'),
            [
                'providers' => $this->get('sonata.media.pool')->getProvidersByContext(
                    $request->get('context', $persistentParameters['context'])
                ),
                'tags' => $tags,
                'tagAdmin' => $tagAdmin,
                'lastItem' => 0,
                'action' => 'list',
                'form' => $formView,
                'datagrid' => $datagrid,
                'galleryListMode' => $galleryListMode,
                'csrf_token' => $this->getCsrfToken('sonata.batch'),
                'show_actions' => true,
            ]
        );
    }
1335601
public function listAction(Request $request)
    {
        $this->denyAccessUnlessGranted('ROLE_SUPER_ADMIN');

        $em = $this->getDoctrine()->getManager();
        $configuratorClassName = '';
        if ($this->container->hasParameter('kunstmaan_user_management.user_admin_list_configurator.class')) {
            $configuratorClassName = $this->container->getParameter(
                'kunstmaan_user_management.user_admin_list_configurator.class'
            );
        }

        $configurator = new $configuratorClassName($em);

        /* @var AdminList $adminList */
        $adminList = $this->container->get('kunstmaan_adminlist.factory')->createList($configurator);
        $adminList->bindRequest($request);

        return array(
            'adminlist' => $adminList,
        );
    }
222735
public function listAction(Request $request)
    {
        $id = $request->get('id');

        $elementtypeService = $this->get('phlexible_elementtype.elementtype_service');
        $usageManager = $this->get('phlexible_elementtype.usage_manager');

        $elementtype = $elementtypeService->findElementtype($id);

        $usages = [];
        foreach ($usageManager->getUsage($elementtype) as $usage) {
            $usages[] = [
                'type' => $usage->getType(),
                'as' => $usage->getAs(),
                'id' => $usage->getId(),
                'title' => $usage->getTitle(),
                'latest_version' => $usage->getLatestVersion(),
            ];
        }

        return new JsonResponse(['list' => $usages, 'total' => count($usages)]);
    }
582469
public function getListPaginate(HCResourceGrabPropertyRequest $request): JsonResponse
   {
       return response()->json(
           $this->service->getRepository()->getListPaginate($request)
       );
   }
232868
public function index(Request $request)
    {
        $contentFolder = $this->content->getRoot();

        $content = $this->content->listFolder($request, $contentFolder);

        if (! $request->has('search')) {
            $contentTypes = $this->content->getCreatableContentTypes($contentFolder->id);
            $shortcuts = $this->content->getShortcuts($contentFolder);
            $isMovable = $content->where('is_movable', true)->count() ? true : false;
        } else {
            app('soda.interface')->breadcrumbs()->addLink(route('soda.content.index'), ucfirst(trans('soda::terminology.content_plural')));
            app('soda.interface')->setHeading('Search');
        }

        return soda_cms_view('data.content.index', compact('contentFolder', 'content', 'contentTypes', 'shortcuts', 'isMovable'));
    }
930971
public function listAction(Request $request)
    {
        $mediaTypeManager = $this->get('phlexible_media_type.media_type_manager');
        $iconResolver = $this->get('phlexible_media_type.icon_resolver');

        $mediaTypes = [];
        foreach ($mediaTypeManager->findAll() as $mediaType) {
            $mediaTypes[] = [
                'id' => $mediaType->getName(),
                'key' => $mediaType->getName(),
                'upperkey' => strtoupper($mediaType->getName()),
                'type' => $mediaType->getCategory(),
                'de' => $mediaType->getTitle('de'),
                'en' => $mediaType->getTitle('en'),
                'mimetypes' => $mediaType->getMimetypes(),
                'icon16' => (bool) $iconResolver->resolve($mediaType, 16),
                'icon32' => (bool) $iconResolver->resolve($mediaType, 32),
                'icon48' => (bool) $iconResolver->resolve($mediaType, 48),
                'icon256' => (bool) $iconResolver->resolve($mediaType, 256),
            ];
        }

        return new JsonResponse([
            'totalCount' => count($mediaTypes),
            'mediatypes' => $mediaTypes,
        ]);
    }
1371852
public function indexAction(Request $request)
    {
        $this->checkPermission();

        $form = $this->createForm(BanType::class);

        if ($request->isMethod('POST')) {
            $form->handleRequest($request);

            if ($form->isValid()) {
                $path = $form['path']->getData();

                $this->get('kunstmaan_cache.helper.varnish')->banPath($path, $form['allDomains']->getData());

                $this->addFlash('success', 'kunstmaan_cache.varnish.ban.success');
            }
        }

        return [
            'form' => $form->createView(),
        ];
    }
680257
public function listAction(Request $request)
    {
        $this->denyAccessUnlessGranted(ContributionActionInterface::READ, UserInterface::ENTITY_TYPE);
        $mapping = array(
            'username' => 'username',
            'groups' => 'groups.label'
        );
        $configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
        $repository = $this->get('open_orchestra_user.repository.user');
        $language = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getBackOfficeLanguage();

        if ($this->get('security.authorization_checker')->isGranted(ContributionRoleInterface::PLATFORM_ADMIN)) {
            $collection = $repository->findForPaginate($configuration, $language);
            $recordsTotal = $repository->count();
            $recordsFiltered = $repository->countWithFilter($configuration, $language);
        } else {
            $sitesId = $this->getAvailableSiteIds();
            $collection = $repository->findForPaginateFilterBySiteIds($configuration, $language, $sitesId);
            $recordsTotal = $repository->countFilterBySiteIds($sitesId);
            $recordsFiltered = $repository->countWithFilterAndSiteIds($configuration, $language, $sitesId);
        }

        $facade = $this->get('open_orchestra_api.transformer_manager')->transform('user_collection', $collection);
        $facade->recordsTotal = $recordsTotal;
        $facade->recordsFiltered = $recordsFiltered;

        return $facade;
    }
71239
public function listAction(Request $request)
    {
        $folderId = $request->get('folder_id');
        $start = $request->get('start', 0);
        $limit = $request->get('limit', 25);
        $sort = $request->get('sort', 'name');
        $dir = $request->get('dir', 'ASC');
        $showHidden = $request->get('show_hidden', false);
        $filter = $request->get('filter');

        if (!$folderId) {
            throw new \RuntimeException('No folder ID');
        }

        if ($filter) {
            $filter = json_decode($filter, true);
        }

        $data = [];
        $total = 0;

        $volume = $this->getVolumeByFolderId($folderId);
        $securityContext = $this->get('security.context');

        $folder = $volume->findFolder($folderId);

        if ($securityContext->isGranted('ROLE_SUPER_ADMIN') || $securityContext->isGranted('FILE_READ', $folder)) {
            if ($sort === 'create_time') {
                $sort = 'created_at';
            } elseif ($sort === 'document_type_key') {
                $sort = 'mime_type';
            }

            if ($filter) {
                $filter['folder'] = $folder;
                if (!$showHidden) {
                    $filter['hidden'] = false;
                }
                $files = $volume->findFiles($filter, [$this->toCamelCase($sort) => $dir], $limit, $start);
                $total = $volume->countFiles($filter);
            } else {
                $files = $volume->findFilesByFolder($folder, [$this->toCamelCase($sort) => $dir], $limit, $start, $showHidden);
                $total = $volume->countFilesByFolder($folder, $showHidden);
            }

            $data = $this->filesToArray($volume, $files);
        }

        return new JsonResponse(['files' => $data, 'totalCount' => $total]);
    }
44883
public function listChartAction(Request $request)
    {
        $query = $this->addOrganizationFilter($request->query->all());
        $chartData = $this->logManager->getChartData($query);

        return new JsonResponse($chartData);
    }
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]
            )
        );
    }
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]);
    }
1021326
public function indexAction(Request $request)
    {
        // Make sure we have a menu for each possible locale
        $this->container->get('kunstmaan_menu.menu.service')->makeSureMenusExist();

        return parent::doIndexAction(
            $this->getAdminListConfigurator($request),
            $request
        );
    }