public function limitControlAction(Request $request, $total = '')
    {
        /* @var $controls ListControls */
        $controls = $this->get('anime_db.item.list_controls');

        if (!is_numeric($total) || $total < 0) {
            /* @var $rep ItemRepository */
            $rep = $this->getDoctrine()->getRepository('AnimeDbCatalogBundle:Item');
            $total = $rep->count();
        }

        return $this->render('AnimeDbCatalogBundle:Item:list_controls/limit.html.twig', [
            'limits' => $controls->getLimits($request->query->all()),
            'total' => $total,
        ]);
    }
public function limitControlAction(Request $request, $total = '')
    {
        /* @var $controls ListControls */
        $controls = $this->get('anime_db.item.list_controls');

        if (!is_numeric($total) || $total < 0) {
            /* @var $rep ItemRepository */
            $rep = $this->getDoctrine()->getRepository('AnimeDbCatalogBundle:Item');
            $total = $rep->count();
        }

        return $this->render('AnimeDbCatalogBundle:Item:list_controls/limit.html.twig', [
            'limits' => $controls->getLimits($request->query->all()),
            'total' => $total,
        ]);
    }
public function limitControlAction ( Request $ request , $ total = '' ) { /* @var $controls ListControls */ $ controls = $ this -> get ( 'anime_db.item.list_controls' ) ; if ( ! is_numeric ( $ total ) || $ total < 0 ) { /* @var $rep ItemRepository */ $ rep = $ this -> getDoctrine ( ) -> getRepository ( 'AnimeDbCatalogBundle:Item' ) ; $ total = $ rep -> count ( ) ; } return $ this -> render ( 'AnimeDbCatalogBundle:Item:list_controls/limit.html.twig' , [ 'limits' => $ controls -> getLimits ( $ request -> query -> all ( ) ) , 'total' => $ total , ] ) ; }
List items limit control.

@param Request $request
@param string|int $total

@return Response
List items limit control .