/** * This method provides a item list overview. * * @Route("/%zikularoutesmodule.routing.route.plural%/%zikularoutesmodule.routing.view.suffix%/{sort}/{sortdir}/{pos}/{num}.{_format}", * name = "zikularoutesmodule_route_view", * requirements = {"sortdir" = "asc|desc|ASC|DESC", "pos" = "\d+", "num" = "\d+", "_format" = "%zikularoutesmodule.routing.formats.view%"}, * defaults = {"sort" = "", "sortdir" = "asc", "pos" = 1, "num" = 0, "_format" = "html"}, * methods = {"GET"} * ) * * @param Request $request Current request instance * @param string $sort Sorting field. * @param string $sortdir Sorting direction. * @param int $pos Current pager position. * @param int $num Amount of entries to display. * @param string $tpl Name of alternative template (to be used instead of the default template). * * @return mixed Output. * * @throws AccessDeniedException Thrown if the user doesn't have required permissions. */ public function viewAction(Request $request, $sort, $sortdir, $pos, $num) { // Always force to see all entries to make sortable working. $request->query->set('all', 1); $groupMessages = array(RouteEntity::POSITION_FIXED_TOP => $this->__('Routes fixed to the top of the list:'), RouteEntity::POSITION_MIDDLE => $this->__('Normal routes:'), RouteEntity::POSITION_FIXED_BOTTOM => $this->__('Routes fixed to the bottom of the list:')); $this->view->assign('groupMessages', $groupMessages); $this->view->assign('sortableGroups', array(RouteEntity::POSITION_MIDDLE)); $configDumper = $this->get('zikula.dynamic_config_dumper'); $configuration = $configDumper->getConfigurationForHtml('jms_i18n_routing'); $this->view->assign('jms_i18n_routing', $configuration); return parent::viewAction($request, $sort, $sortdir, $pos, $num); }
/** * This method provides a item list overview. * * @Route("/routes/view/{sort}/{sortdir}/{pos}/{num}.{_format}", * requirements = {"sortdir" = "asc|desc|ASC|DESC", "pos" = "\d+", "num" = "\d+", "_format" = "html|kml"}, * defaults = {"sort" = "", "sortdir" = "asc", "pos" = 1, "num" = 0, "_format" = "html"}, * methods = {"GET"} * ) * * @param Request $request Current request instance * @param string $sort Sorting field. * @param string $sortdir Sorting direction. * @param int $pos Current pager position. * @param int $num Amount of entries to display. * @param string $tpl Name of alternative template (to be used instead of the default template). * * @return mixed Output. * * @throws AccessDeniedException Thrown if the user doesn't have required permissions. */ public function viewAction(Request $request, $sort, $sortdir, $pos, $num) { return parent::viewAction($request, $sort, $sortdir, $pos, $num); }