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,
        ]);
    }
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,
        ]);
    }
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 , ] ) ; }
Renders the URLs list.

@param Request $request

@return Response
Renders the URLs list .