@Route("/like/list/{page}", name="icap_socialmedia_likelist", defaults={"page" = "1"})
@Method({"GET"})

@param Request $request
@Template()

@param $page

@return array
11341
public function likeListAction(Request $request, $page)
    {
        $likesQB = $this->getLikeActionManager()->getLikesForPagination($request);
        $pager = $this->paginateQuery($likesQB, $page);
        $parameters = $request->query->all();
        $parameters['page'] = ($pager->hasNextPage()) ? $pager->getNextPage() : 0;

        return ['pager' => $pager, 'parameters' => $parameters];
    }
987930
public function listAction(Request $request)
    {
        $this->denyAccessUnlessGranted(ContributionActionInterface::READ, ContentTypeInterface::ENTITY_TYPE);
        $mapping = array(
            'name' => 'names',
            'content_type_id' => 'contentTypeId',
            'linked_to_site' => 'linkedToSite'
        );
        $configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
        $repository = $this->get('open_orchestra_model.repository.content_type');

        $collection = $repository->findAllNotDeletedInLastVersionForPaginate($configuration);
        $recordsTotal = $repository->countByContentTypeInLastVersion();
        $recordsFiltered = $repository->countNotDeletedInLastVersionWithSearchFilter($configuration);
        $facade = $this->get('open_orchestra_api.transformer_manager')->transform('content_type_collection', $collection);
        $facade->recordsTotal = $recordsTotal;
        $facade->recordsFiltered = $recordsFiltered;

        return $facade;
    }
1367240
public function socialMedia(Request $request)
    {
        //$row = LogSocialShare::create([
        //    'type'         => input('type'),
        //    'title'        => input('title'),
        //    'description'  => input('description'),
        //    'url'          => input('url'),
        //    'image'        => input('image'),
        //    'client_ip'    => $this->clientIp,
        //    'client_agent' => $this->clientAgent,
        //]);

        $url = substr(input('url'), strlen(config('app.url')));

        $page = Page::where('url', $url)->first();
        if($page) {
            $page->increment('social_shares');
            //$page->increment('facebook_shares');
        }

        return json_response();
    }
779768
public function postTitle(Request $request, Page $page)
    {
        $this->authorize('edit', $page);

        $oldTitle = $page->getTitle();
        $page->setTitle($request->input('title'));

        Event::fire(new Events\PageTitleWasChanged($page, $oldTitle, $page->getTitle()));

        return [
            'status'   => $page->getCurrentVersion()->getStatus(),
            'location' => (string) URLFacade::page($page),
        ];
    }
1285778
public function get($pages = 0)
    {
        $endpoint = $this->getEndpoint();
        $params = $this->getParams();
        $list = $this->getClient()->request($endpoint, 'GET', $params);

        $i = 1;
        while ($list['metadata']['continue']) {
            if ($pages > 0 && $pages >= $i) {
                return $list;
            }
            $params['continue'] = $list['metadata']['continue'];
            $i_list = $this->getClient()->request($endpoint, 'GET', $params);
            $i_list['items'] = array_merge($list['items'], $i_list['items']);
            $list = $i_list;
            unset($i_list);
            $i++;
        }

        return $list;
    }
1283598
public function listAction(Request $request): Response
    {
        $page = $request->query->get('page') ?? 1;

        $pagerfanta = new Pagerfanta(
            new ArrayAdapter($this->languageService->loadLanguages())
        );

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

        /** @var Language[] $languageList */
        $languageList = $pagerfanta->getCurrentPageResults();

        $deleteLanguagesForm = $this->formFactory->deleteLanguages(
            new LanguagesDeleteData($this->getLanguagesNumbers($languageList))
        );

        return $this->render('@ezdesign/admin/language/list.html.twig', [
            'pager' => $pagerfanta,
            'form_languages_delete' => $deleteLanguagesForm->createView(),
            /* @deprecated since version 2.2, to be removed in 3.0. Use 'can_administrate' instead. */
            'canEdit' => $this->isGranted(new Attribute('content', 'translations')),
            /* @deprecated since version 2.2, to be removed in 3.0. Use 'can_administrate' instead. */
            'canAssign' => $this->isGranted(new Attribute('content', 'translations')),
            'can_administrate' => $this->isGranted(new Attribute('content', 'translations')),
        ]);
    }
1363081
public function listJsonAction(Request $request)
    {
        $totalEntities = $this->countTotal();
                
        $offset = intval($request->get('iDisplayStart'));
        $limit = intval($request->get('iDisplayLength'));
        $sortColumn = intval($request->get('iSortCol_0'));
        $sortDirection = $request->get('sSortDir_0');
        $search = $request->get('sSearch');
        $echo = intval($request->get('sEcho'));
        
        $entities = $this->findAllForDataTables($search, $sortColumn, $sortDirection, null, $request->getLocale());
        
        $totalFilteredEntities = count($entities->getScalarResult());

        // paginate
        $entities->setFirstResult($offset)
            ->setMaxResults($limit);

        $data = $entities->getResult();


        $response = array(
            'iTotalRecords'         => $totalEntities,
            'iTotalDisplayRecords'  => $totalFilteredEntities,
            'sEcho'                 => $echo,
            'aaData'                => $data
        );
        

        return new JsonResponse($response);
    }
213491
public function batch($page, Request $request)
    {
        $this->authorize($action = $request->get('batch_action'), $model = app('scaffold.module')->model());

        $response = app('scaffold.actions')->exec('batch::'.$action, [$model, $request]);

        if ($response instanceof Response || $response instanceof Renderable) {
            return $response;
        }

        return back()->with(
            'messages',
            [trans('administrator::messages.action_success')]
        );
    }
1325792
public function listAction(Request $request)
    {
        $id = $request->get('id');

        $elementtypeService = $this->get('phlexible_elementtype.elementtype_service');
        $viabilityManager = $this->get('phlexible_elementtype.viability_manager');
        $elementtype = $elementtypeService->findElementtype($id);

        $viabilities = [];
        foreach ($viabilityManager->findAllowedParents($elementtype) as $viability) {
            $viabilityElementtype = $elementtypeService->findElementtype($viability->getUnderElementtypeId());
            $viabilities[] = [
                'id' => $viabilityElementtype->getId(),
                'title' => $viabilityElementtype->getTitle(),
                'icon' => $viabilityElementtype->getIcon(),
            ];
        }

        return new JsonResponse(['viability' => $viabilities]);
    }
848177
public function facebookLikeAction(Request $request)
    {
        $response = $request->get('response');
        $value = $request->get('value');
        $this->get('event_dispatcher')->dispatch(Events::FACEBOOK_LIKE, new FacebookLikeEvent($request, $response, $value));
    }
213393
public function findByRequest(Request $request): ?PageInterface
    {
        if (null !== $route = $request->attributes->get('_route', null)) {
            return $this->findByRoute($route);
        }

        return null;
    }
801610
public function getList(int $page, int $limit, Context $context, array $requestFilters, array $sort): array
    {
        --$page;
        $metaData = $this->getSetMetaData($context);

        $isoList = $this->createIsoList($metaData);
        $languageFiles = $this->getSnippetFilesByIso($isoList);

        $fileSnippets = $this->getFileSnippets($languageFiles, $isoList);
        $dbSnippets = $this->databaseSnippetsToArray($this->findSnippetInDatabase(new Criteria(), $context), $fileSnippets);

        $snippets = array_replace_recursive($fileSnippets, $dbSnippets);
        $snippets = $this->fillBlankSnippets($snippets, $isoList);

        foreach ($requestFilters as $requestFilterName => $requestFilterValue) {
            $snippets = $this->snippetFilterFactory->getFilter($requestFilterName)->filter($snippets, $requestFilterValue);
        }

        $snippets = $this->sortSnippets($sort, $snippets);

        $total = 0;
        foreach ($snippets as $setId => &$set) {
            $total = $total > 0 ? $total : count($set['snippets']);
            $set['snippets'] = array_chunk($set['snippets'], $limit, true)[$page] ?? [];
        }

        return [
            'total' => $total,
            'data' => $this->mergeSnippetsComparison($snippets),
        ];
    }
959652
public function getApiApps($page = 1, $page_size = 20)
    {
        $response = $this->rest->get(static::APIAPP_LIST_PATH, array('page' => $page, 'page_size' => $page_size));

        $this->checkResponse($response);

        $list = new ApiAppList($response);

        if ($page > $list->getNumPages()) {
            throw new Error('page_not_found', 'Page not found');
        }

        return $list;
    }
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()),
        ));
    }
260185
public function indexAction(Request $request)
    {

        $page = $request->get("page", 1);
        $em = $this->getDoctrine()->getManager();
        $dql = "SELECT p FROM AmulenPageBundle:Page p";
        $query = $em->createQuery($dql);
        $paginator = $this->get('knp_paginator');
        $pagination = $paginator->paginate($query, $this->get('request')->query->get('page', $page));

        return array(
            'pagination' => $pagination,
        );
    }
718485
public function getSeatUserList(Request $request)
    {

        return response()->json([
            'results' => DB::table('users')
                ->select('id', 'name as text')
                ->where('name', 'like', '%' . $request->q . '%')
                ->orderBy('name', 'asc')
                ->get(),
        ]);
    }
397480
public function indexAction(Request $request) {
        $page = $request->get("page", 1);
        $searchStr = $request->get("search");
        $type = $request->get("type");
        $em = $this->getDoctrine()->getManager();
        $query = $em->getRepository("AmulenMediaBundle:Gallery")->getQuerySearch($searchStr, $type);

        $paginator = $this->get('knp_paginator');
        $pagination = $paginator->paginate(
                $query, $this->get('request')->query->get('page', $page));

        return array(
            'pagination' => $pagination,
            'searchStr' => $searchStr,
            'type' => $type,
        );
    }