/** * Management page of Advertisements. * * @param Request $request * @return \Symfony\Component\HttpFoundation\Response */ public function indexAction(Request $request) { $advertisementTypeId = $request->get('advertisementType', 0); if ($advertisementTypeId == ListFilter::FILTER_KEY_ALL) { $advertisementTypeId = 0; } $params = array('advertisementStatus' => AdvertisementStatuses::getList(), 'advertisementTypeId' => $advertisementTypeId, 'advertisements' => $this->filteredResult, 'pager' => $this->pager); return $this->render('AdminBundle:Advertisement:index.html.twig', $params); }
function setFilterOptions() { $this->setAdvertisementTypeFilterOption(); $statusOptions = array(ListFilter::FILTER_KEY_ALL => ListFilter::FILTER_LABEL_ALL) + AdvertisementStatuses::getList(); $this->setStatusFilterOption($statusOptions); }