@param Request $request
@return Response

@Route("/", name="novosga_triage_index", methods={"GET"})
431581
public function index(Request $request, ServicoService $servicoService, SecurityService $securityService)
    {
        $em      = $this->getDoctrine()->getManager();
        $usuario = $this->getUser();
        $unidade = $usuario->getLotacao()->getUnidade();
        
        $prioridades = $em->getRepository(Prioridade::class)->findAtivas();
        $servicos    = $servicoService->servicosUnidade($unidade, ['ativo' => true]);
        
        return $this->render('@NovosgaTriage/default/index.html.twig', [
            'usuario'     => $usuario,
            'unidade'     => $unidade,
            'servicos'    => $servicos,
            'prioridades' => $prioridades,
            'wsSecret'    => $securityService->getWebsocketSecret(),
        ]);
    }
191032
public function index(Request $request)
    {
        $menuGroups = $this->menuGroupRepository->all();
        if ($request->get('group_id') == 'new') {
            $menuGroup = new MenuGroup;
            $menuGroup->name = 'New Group';
        } elseif ($request->get('group_id') > 0) {
            $menuGroup = $this->menuGroupRepository->find($request->get('group_id'));
        } else {
            $menuGroup = $this->menuGroupRepository
                ->query()
                ->whereIsDefault(1)
                ->first();
        }

        if (null === $menuGroup) {
            $menuGroup = new MenuGroup;
        }

        return view('avored-framework::cms.menu.index')
            ->withMenuGroups($menuGroups)
            ->withGroup($menuGroup);
    }
619910
public function index(Request $request)
    {
        $this->getFormRequestInstance();

        $items = $this->getItemsCollection();

        if ($request->wantsJson()) {
            return $this->validSuccessJsonResponse('Success', $items);
        }

        $view = $this->getViewLocation(__FUNCTION__);
        $this->checkViewExists($view);

        return response()->view($view, compact('items'));
    }
885989
public function indexAction(Request $request)
    {
        $id = $request->get('id');
        $version = $request->get('version');
        $mode = $request->get('mode', 'edit');

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

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

        $rootNode = $elementtypeStructure->getRootNode();
        $type = $elementtype->getType(); // != 'reference' ? 'root' : 'referenceroot';

        $children = [];
        $rootDsId = '';
        $rootType = 'root';
        if ($rootNode) {
            $rootDsId = $rootNode->getDsId();
            $rootType = $rootNode->getType();
            $children = $elementtypeStructure->getChildNodes($rootNode->getDsId());
        }

        $language = $this->getUser()->getInterfaceLanguage('en');
        if (!$language) {
            $language = 'en';
        }

        $data = [
            [
                'text' => $elementtype->getTitle($language)
                    .' [v'.$elementtype->getRevision().', '
                    .$elementtype->getType().']',
                'id' => md5(serialize($rootNode)),
                'ds_id' => $rootDsId,
                'element_type_id' => $elementtype->getId(),
                'element_type_version' => $elementtype->getRevision(),
                'icon' => '/bundles/phlexibleelementtype/elementtypes/'.$elementtype->getIcon(),
                'cls' => 'p-elementtypes-type-'.$type,
                'leaf' => false,
                'expanded' => true,
                'type' => $rootType,
                'allowDrag' => ($type === Elementtype::TYPE_REFERENCE),
                'allowDrop' => $mode === 'edit',
                'editable' => $mode === 'edit',
                'properties' => [
                    'root' => [
                        'title' => $elementtype->getTitle($language),
                        'reference_title' => $elementtype->getTitle($language)
                            .' [v'.$elementtype->getRevision().']',
                        'unique_id' => $elementtype->getUniqueId(),
                        'icon' => $elementtype->getIcon(),
                        'hide_children' => $elementtype->getHideChildren() ? 'on' : '',
                        'default_tab' => $elementtype->getDefaultTab(),
                        'default_content_tab' => $elementtype->getDefaultContentTab(),
                        'type' => $type,
                        'template' => $elementtype->getTemplate(),
                        'metaset' => $elementtype->getMetaSetId(),
                        'comment' => $elementtype->getComment(),
                    ],
                    'mappings' => $elementtype->getMappings(),
                ],
                'children' => $this->recurseTree(
                    $elementtypeStructure,
                    $children,
                    $language,
                    $mode,
                    false,
                    true
                ),
            ],
        ];

        return new JsonResponse($data);
    }
401296
public function dispatch(Request $request)
	{
		$this->currentRequest = $request;

		// If no response was returned from the before filter, we will call the proper
		// route instance to get the response. If no route is found a response will
		// still get returned based on why no routes were found for this request.
		$response = $this->callFilter('before', $request);

		if (is_null($response))
		{
			$response = $this->dispatchToRoute($request);
		}

		// Once this route has run and the response has been prepared, we will run the
		// after filter to do any last work on the response or for this application
		// before we will return the response back to the consuming code for use.
		$response = $this->prepareResponse($request, $response);

		$this->callFilter('after', $request, $response);

		return $response;
	}
870428
public function indexAction(Request $request)
    {
        if ($request->get('attribute')) {
            $attribute = $this->get('opifer.eav.attribute_manager')->getRepository()
                ->find($request->get('attribute'));

            if ($attribute->getAllowedSchemas()->count() === 0) {
                // Remove attribute from request because we want all schemas if this attribute doesn't
                // have any allowed schemas.
                $request->query->remove('attribute');
            }
        }

        $schemas = $this->get('opifer.eav.schema_manager')->getRepository()->findByRequest($request);

        $data = $this->get('jms_serializer')->serialize($schemas, 'json');

        return new Response($data, 200, [ 'Content-Type' => 'application/json' ]);
    }
982827
public function dispatch(Request $request)
    {
        $pathInfo = $request->getPathInfo();
        $method   = $request->getMethod();

        $route = $this->collection->find($method, $pathInfo);

        if ( ! $route) {
            throw new \Exception('Route not found !');
        }

        return $this->dispatcher->dispatch($route);
    }
1176843
public function indexAction(Request $request)
    {
        $query = htmlspecialchars($request->query->get('q'));

        $queryMinLength = $this->getParameter('darvin_admin.search_query_min_length');

        $queryTooShort = mb_strlen($query) < $queryMinLength;

        $entityNames = $queryTooShort ? [] : $this->getSearcher()->getSearchableEntityNames();

        return $this->render('DarvinAdminBundle:Search:index.html.twig', [
            'entity_names'     => $entityNames,
            'query'            => $query,
            'query_min_length' => $queryMinLength,
            'query_too_short'  => $queryTooShort,
        ]);
    }
342103
public function indexAction(Request $request)
    {
        $manager = $this->get('compo_faq.manager.faq');

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

        $pager = $manager->getPager([], $page);
        $totalPages = $pager->getPageCount();

        $seoPage = $this->get('sonata.seo.page');
        $seoPage->setContext('faq_list');
        $seoPage->addVar('page', $page);
        $seoPage->addVar('total_pages', $pager->getPageCount());

        if (1 !== $page) {
            $seoPage->setLinkCanonical($manager->getFaqIndexPermalink(['page' => $page], 0));
            $metas = $seoPage->getMetas();
            $metas['name']['robots'] = 'noindex, follow';
            $seoPage->setMetas($metas);
        } else {
            $seoPage->setLinkCanonical($manager->getFaqIndexPermalink([], 0));
        }

        if ($totalPages > 1 && $page < $totalPages) {
            $seoPage->setLinkNext($manager->getFaqIndexPermalink(['page' => $page + 1], 0));
        }

        if ($totalPages > 1 && $page > 1) {
            $seoPage->setLinkPrev($manager->getFaqIndexPermalink(['page' => $page - 1], 0));
        }

        $seoPage->build();

        return $this->render(
            'CompoFaqBundle:Faq:index.html.twig',
            [
                'pager' => $pager,
            ]
        );
    }
105820
public function indexAction(Request $request)
    {
        return $this->processView($action = 'index', $this->view($this->find($action, false)));
    }
676590
public function index(Request $request)
    {
        $notifications = $this->service->userBasedPaginated(Auth::id());
        return view('notifications.index')->with('notifications', $notifications);
    }
742656
public function sortAction(Request $request)
    {
        $tid = $request->get('tid');
        $mode = $request->get('mode');
        $dir = strtolower($request->get('dir'));
        $sortTids = $request->get('sort_ids');
        $sortTids = json_decode($sortTids, true);

        $treeManager = $this->get('phlexible_tree.tree_manager');
        $nodeSorter = $this->get('phlexible_tree.node_sorter');

        $tree = $treeManager->getByNodeId($tid);
        $node = $tree->get($tid);

        $node->setSortMode($mode);
        $node->setSortDir($dir);

        if ($mode !== TreeInterface::SORT_MODE_FREE) {
            $sortTids = $nodeSorter->sort($node);
        }

        if (count($sortTids)) {
            $tree->reorderChildren($node, $sortTids);
        }

        return new ResultResponse(true, 'Tree sort published.');
    }
1152664
public function indexAction(Request $request)
    {
        $query = $this->get('ydle.logger')->createViewLogQuery();

        $paginator  = $this->get('knp_paginator');
        $pagination = $paginator->paginate(
            $query,
            $this->get('request')->query->get('page', 1)/*page number*/,
            25/*limit per page*/
        );

        $logs = new Logs();
        $form = $this->createForm("logsfilter_form", $logs);

        return $this->render('YdleHubBundle:Logs:index.html.twig', array(
            'pagination' => $pagination,
            'form' => $form->createView()
        ));
    }
654434
public function toResponse($request)
    {
        return tap(response()->json(
            $this->wrap(
                $this->resource->resolve($request),
                array_merge_recursive(
                    $this->paginationInformation($request),
                    $this->resource->with($request),
                    $this->resource->additional
                )
            ),
            $this->calculateStatus()
        ), function ($response) use ($request) {
            $response->original = $this->resource->resource->pluck('resource');

            $this->resource->withResponse($request, $response);
        });
    }
451392
public function ajaxIndexAction(Request $request): Response
    {
        if (!$request->isXmlHttpRequest()) {
            return $this->redirectToAction('index');
        }
        
        $attributeGroupId = (int)$request->request->get('id');
        $attributeGroup   = $this->getManager()->findAttributeGroup($attributeGroupId);
        
        return $this->jsonResponse([
            'attributes' => $this->getManager()->getRepository()->getAttributeSet($attributeGroup),
        ]);
    }
1181851
public function indexAction(Request $request)
    {
        /** @var HttpErrorRepository $errorRepository */
        $errorRepository = $this->getDoctrine()->getManager()->getRepository('VictoireSeoBundle:HttpError');

        // Fetch errors

        $routes = $errorRepository->getRouteErrors();
        $routesResults = $routes->getQuery()->getResult();

        $files = $errorRepository->getFileErrors();
        $filesResults = $files->getQuery()->getResult();

        // Build forms

        $forms = [];
        $errors = array_merge($routesResults, $filesResults);

        /** @var Error404 $error */
        foreach ($errors as $error) {
            $redirection = new ErrorRedirection();
            $redirection->setError($error);
            $forms[$error->getId()] = $this->getError404RedirectionForm($redirection)->createView();
        }

        // Return datas

        return new Response($this->renderView('@VictoireSeo/Error404/index.html.twig', [
            'routes' => $routesResults,
            'files'  => $filesResults,
            'forms'  => $forms,
        ]));
    }
964456
public function cgetAction(Request $request)
    {
        // required parameter
        $locale = $this->getRequestParameter($request, 'locale', true);
        $entityClass = $this->getRequestParameter($request, 'entityClass', true);
        $entityId = $this->getRequestParameter($request, 'entityId', true);

        // optional parameter
        $history = $this->getBooleanRequestParameter($request, 'history', false, false);

        $routes = $this->findRoutes($history, $entityClass, $entityId, $locale);

        return $this->handleView($this->view(new CollectionRepresentation($routes, 'routes')));
    }