Query the topics created by current account

@param ListTopicRequest $request : define filters for quering topics

@return ListTopicResponse: the response containing topicNames
437251
public function listTopic(ListTopicRequest $request)
    {
        $response = new ListTopicResponse();

        return $this->client->sendRequest($request, $response);
    }
1316785
public function listsetsAction(Request $request)
    {
        $folderId = $request->get('folder_id');

        $volumeManager = $this->get('phlexible_media_manager.volume_manager');
        $folderMetaSetResolver = $this->get('phlexible_media_manager.folder_meta_set_resolver');

        $folder = $volumeManager->getByFolderId($folderId)->findFolder($folderId);
        $metaSets = $folderMetaSetResolver->resolve($folder);

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

        return new JsonResponse(['sets' => $sets]);
    }
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]);
    }
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);
    }
1155165
public function userActionsListAction(Request $request)
    {
        $query = $this->addOrganizationFilter($request->query->all());
        $userList = $this->logManager->getUserActionsList($query);

        return new JsonResponse($userList);
    }
1329705
public function listAction(Request $request)
    {
        $folderId = $request->get('node', null);

        $data = [];

        $slots = new Slots();
        $volumeManager = $this->get('phlexible_media_manager.volume_manager');
        $dispatcher = $this->get('event_dispatcher');
        $permissionRegistry = $this->get('phlexible_access_control.permission_registry');

        if (!$folderId || $folderId === 'root') {
            foreach ($volumeManager->all() as $volume) {
                $rootFolder = $volume->findRootFolder();

                if (!$this->isGranted('ROLE_SUPER_ADMIN') && !$this->isGranted('FOLDER_READ', $rootFolder)) {
                    continue;
                }

                // TODO: fix
                $userRights = array();
                foreach ($permissionRegistry->get(get_class($rootFolder))->all() as $permission) {
                    $userRights[] = $permission->getName();
                }

                $slot = new SiteSlot();
                $slot->setData(
                    [
                        [
                            'id' => $rootFolder->getId(),
                            'site_id' => $volume->getId(),
                            'text' => $rootFolder->getName(),
                            'cls' => 't-mediamanager-root',
                            'leaf' => !$volume->countFoldersByParentFolder($rootFolder),
                            'numChilds' => $volume->countFilesByFolder($rootFolder),
                            'draggable' => false,
                            'expanded' => true,
                            'allowDrop' => true,
                            'versions' => $volume->hasFeature('versions'),
                            'rights' => $userRights,
                        ],
                    ]
                );

                $slots->append($slot);
            }

            $event = new GetSlotsEvent($slots);
            $dispatcher->dispatch(MediaManagerEvents::GET_SLOTS, $event);

            $data = $slots->getAllData();

            //            $data[] = array(
            //                'id'        => 'tags',
            //                'text'      => 'Tags',
            //                'iconCls'   => 'p-mediamanager-tag-icon',
            //                'cls'       => 't-mediamanager-root',
            //                'leaf'      => false,
            //                'children' => array(array(
            //                    'id' => 'tag1',
            //                    'text' => 'tag1',
            //                    'leaf' => true
            //                )),
            //                'draggable' => false,
            //                'expanded'  => true,
            //                'allowDrag' => false,
            //                'allowDrop' => false,
            //                'module'    => true,
            //            );
        } else {
            $slotKey = $request->get('slot', null);
            if (!$slotKey) {
                $volume = $volumeManager->getByFolderId($folderId);
                $folder = $volume->findFolder($folderId);

                if (!$this->isGranted('ROLE_SUPER_ADMIN') && !$this->isGranted('FOLDER_READ', $folder)) {
                    return new JsonResponse([]);
                }

                foreach ($volume->findFoldersByParentFolder($folder) as $subFolder) {
                    if (!$this->isGranted('ROLE_SUPER_ADMIN') && !$this->isGranted('FOLDER_READ', $subFolder)) {
                        continue;
                    }

                    // TODO: fix
                    $userRights = array();
                    foreach ($permissionRegistry->get(get_class($subFolder))->all() as $permission) {
                        $userRights[] = $permission->getName();
                    }

                    $folderUsageService = $this->get('phlexible_media_manager.folder_usage_manager');
                    $usage = $folderUsageService->getStatus($folder);
                    $usedIn = $folderUsageService->getUsedIn($folder);
                    // TODO: also files in folder!

                    $tmp = [
                        'id' => $subFolder->getId(),
                        'site_id' => $volume->getId(),
                        'text' => $subFolder->getName(),
                        'leaf' => false,
                        'numChilds' => $volume->countFilesByFolder($subFolder),
                        'allowDrop' => true,
                        'allowChildren' => true,
                        'isTarget' => true,
                        'versions' => $volume->hasFeature('versions'),
                        'rights' => $userRights,
                        'used_in' => $usedIn,
                        'used' => $usage,
                    ];

                    if (!$volume->countFoldersByParentFolder($subFolder)) {
                        //$tmp['leaf'] = true;
                        $tmp['expanded'] = true;
                        $tmp['children'] = [];
                    }

                    $data[] = $tmp;
                }
            } else {
                $slots = new Slots();

                $event = new GetSlotsEvent($slots);
                $dispatcher->dispatch($event);

                $slot = $slots->getSlot($slotKey);

                $data = $slot->getData(false);
            }
        }

        return new JsonResponse($data);
    }
21624
public function index(ListRequest $request)
    {
        return $this->paginate(
            $this->service->index(
                $request->all(),
                $request->getParams()['limit'],
                [$request->getParams()['order'] => $request->getParams()['sort']],
                ['*'],
                $request->getParams()['page']
            )
        );
    }
663269
public function listJsonAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        /** @var \AdminBundle\Services\DataTables\JsonList $jsonList */
        $jsonList = $this->get('json_list');
        $jsonList->setRepository($em->getRepository('CoreBundle:Page'));
        $jsonList->setLocale($request->getLocale());
        $response = $jsonList->get();
        

        return new JsonResponse($response);
    }
689490
public function listAction(Request $request)
    {
        $current_page = $request->get('page', 1);
        $current_page = $current_page > 1 ? $current_page : 1;
        $rep = $this->getRepository();

        // filter list notice
        $filter = $this->createForm('notices_filter')->handleRequest($request);
        if ($filter->isValid()) {
            $query = $rep->getFilteredQuery($filter->getData()['status'], $filter->getData()['type']);
        } else {
            $query = $rep->createQueryBuilder('n');
        }
        $query
            ->orderBy('n.date_created', 'DESC')
            ->setFirstResult(($current_page - 1) * self::NOTICE_PER_PAGE)
            ->setMaxResults(self::NOTICE_PER_PAGE);
        $list = $query->getQuery()->getResult();

        // get count all items
        $count = $query
            ->select('COUNT(n)')
            ->getQuery()
            ->getSingleScalarResult();

        // pagination
        $that = $this;
        $request_query = $request->query->all();
        unset($request_query['page']);
        $pagination = $this->get('anime_db.pagination')
            ->create(ceil($count / self::NOTICE_PER_PAGE), $current_page)
            ->setPageLink(function ($page) use ($that, $request_query) {
                return $that->generateUrl('notice_list', array_merge($request_query, ['page' => $page]));
            })
            ->setFirstPageLink($this->generateUrl('notice_list', $request_query))
            ->getView();

        return $this->render('AnimeDbCatalogBundle:Notice:list.html.twig', [
            'list' => $list,
            'pagination' => $pagination,
            'change_form' => $this->createForm(new ChangeNotice())->createView(),
            'filter' => $filter->createView(),
            'action_remove' => ChangeNotice::ACTION_REMOVE,
        ]);
    }
115977
protected function preList(Request $request)
    {
        /** @var AbstractAdmin $admin */
        $admin = $this->getAdmin();

        $filters = $request->query->get('filter', []);

        $parentAssociationMapping = $admin->getParentAssociationMapping();

        if ($parentAssociationMapping && $admin->isChild()) {
            $name = str_replace('.', '__', $parentAssociationMapping);

            if (isset($filters[$name]) && \is_array($filters[$name]['value'])) {
                $targetAdmin = $admin->getConfigurationPool()->getAdminByAdminCode($admin->getCode());

                if (\count($filters[$name]['value']) > 1) {
                    return new RedirectResponse(
                        $targetAdmin->generateUrl('list', ['filter' => $filters])
                    );
                }

                if ($filters[$name]['value'][0] !== $request->get($admin->getParent()->getIdParameter())) {
                    return new RedirectResponse(
                        $targetAdmin->generateUrl('list', ['filter' => $filters])
                    );
                }
            }
        }

        return null;
    }
1268296
public function index(Request $request)
    {
        $limit = 20;
        $prev = null;
        $user = $request->user();

        $this->validate($request, [
            'since'     => 'iso8601',
            'until'     => 'iso8601',
            'cursor'    => 'uuid',
            'tag_id'    => 'uuid',
            'source_id' => 'uuid',
            ]);

        $dids = $user->dids()
            ->fullTextSearchFilter($request->q, $user->id)
            ->tagFilter($request->tag_id)
            ->sourceFilter($request->source_id)
            ->cursorFilter($request->cursor)
            ->dateFilter($request->since, $request->until)
            ->with(['tags', 'source'])
            ->orderBy(DB::raw('uuid_v1_timestamp(id)'), 'DESC')
            ->limit($limit)->get();

        // if the cursor is being passed in then we need to obtain the previous id.
        if(!empty($request->cursor)){
            $dids_prev = $user->dids()
                ->fullTextSearchFilter($request->q, $user->id)
                ->tagFilter($request->tag_id)
                ->sourceFilter($request->source_id)
                ->prevFilter($request->cursor)
                ->dateFilter($request->since, $request->until)
                ->orderBy(DB::raw('uuid_v1_timestamp(id)'), 'ASC')
                ->limit($limit)->get();

            if($dids_prev->count() == $limit) $prev = $dids_prev->last()->id;
        }

        $results = fractal()
            ->collection($dids, new DidTransformer())
            ->withCursor(new Cursor($request->cursor, $prev, $dids, $limit));

        return response()->json($results);
    }
1004266
public function listAction(Request $request): Response
    {
        $data = new URLListData();

        $form = $this->formFactory->createUrlListForm($data, '', [
            'method' => Request::METHOD_GET,
            'csrf_protection' => false,
        ]);
        $form->handleRequest($request);
        if ($form->isSubmitted() && !$form->isValid()) {
            throw new BadRequestHttpException();
        }

        $urls = new Pagerfanta(new URLSearchAdapter(
            $this->buildListQuery($data),
            $this->urlService
        ));

        $urls->setCurrentPage($data->page);
        $urls->setMaxPerPage($data->limit ? $data->limit : self::DEFAULT_MAX_PER_PAGE);

        return $this->render('@ezdesign/link_manager/list.html.twig', [
            'form' => $form->createView(),
            'can_edit' => $this->isGranted(new Attribute('url', 'update')),
            'urls' => $urls,
        ]);
    }
1256517
public function listAction(Request $request): Response
    {
        $deletableContentTypeGroup = [];
        $count = [];

        $page = $request->query->get('page') ?? 1;

        $pagerfanta = new Pagerfanta(
            new ArrayAdapter($this->contentTypeService->loadContentTypeGroups())
        );

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

        /** @var \eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup[] $contentTypeGroupList */
        $contentTypeGroupList = $pagerfanta->getCurrentPageResults();

        $deleteContentTypeGroupsForm = $this->formFactory->deleteContentTypeGroups(
            new ContentTypeGroupsDeleteData($this->getContentTypeGroupsNumbers($contentTypeGroupList))
        );

        foreach ($contentTypeGroupList as $contentTypeGroup) {
            $contentTypesCount = count($this->contentTypeService->loadContentTypes($contentTypeGroup));
            $deletableContentTypeGroup[$contentTypeGroup->id] = !(bool)$contentTypesCount;
            $count[$contentTypeGroup->id] = $contentTypesCount;
        }

        return $this->render('@ezdesign/admin/content_type_group/list.html.twig', [
            'pager' => $pagerfanta,
            'form_content_type_groups_delete' => $deleteContentTypeGroupsForm->createView(),
            'deletable' => $deletableContentTypeGroup,
            'content_types_count' => $count,
            'can_create' => $this->isGranted(new Attribute('class', 'create')),
            'can_update' => $this->isGranted(new Attribute('class', 'update')),
            'can_delete' => $this->isGranted(new Attribute('class', 'delete')),
        ]);
    }
1171250
public function listAction(Request $request)
    {
        $this->denyAccessUnlessGranted(ContributionActionInterface::READ, SiteInterface::ENTITY_TYPE);
        $mapping = array(
            'name' => 'name'
        );
        $configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
        $repository =  $this->get('open_orchestra_model.repository.site');

        $siteIds = null;
        if (false === $this->get('security.authorization_checker')->isGranted(ContributionRoleInterface::PLATFORM_ADMIN)) {
            $siteIds = array();
            $availableSites = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getAvailableSites();
            foreach ($availableSites as $site) {
                $siteIds[] = $site->getSiteId();
            }
        }

        $collection = $repository->findForPaginateFilterBySiteIds($configuration, $siteIds);
        $recordsTotal = $repository->countFilterBySiteIds($siteIds);
        $recordsFiltered = $repository->countWithFilterAndSiteIds($configuration, $siteIds);
        $facade = $this->get('open_orchestra_api.transformer_manager')->transform('site_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]);
    }
408819
public function index(PriceListRequest $request)
    {
        $view = $this->response->theme->listView();

        if ($this->response->typeIs('json')) {
            $function = camel_case('get-' . $view);
            return $this->repository
                ->setPresenter(\Litecms\Pricelist\Repositories\Presenter\PriceListPresenter::class)
                ->$function();
        }

        $price_lists = $this->repository->paginate();

        return $this->response->title(trans('pricelist::price_list.names'))
            ->view('pricelist::price_list.index', true)
            ->data(compact('price_lists'))
            ->output();
    }
1003458
public function listAction(Request $request)
    {
        $query = $this->addOrganizationFilter($request->query->all());

        return new JsonResponse($this->finder->search(
            $this->getClass(),
            $query,
            []
        ));
    }