コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 function setFilterOptions()
 {
     $this->setAdvertisementTypeFilterOption();
     $statusOptions = array(ListFilter::FILTER_KEY_ALL => ListFilter::FILTER_LABEL_ALL) + AdvertisementStatuses::getList();
     $this->setStatusFilterOption($statusOptions);
 }