Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function executeIndex(sfWebRequest $request)
- {
- $perpage = sfConfig::get('app_max_per_page', 20);
- $this->shopprods = new sfDoctrinePager('Cat', $perpage);
- $this->filterform = new shopprodFormFilter();
- if ($request->hasParameter($this->filterform->getName())
- {
- $this->filterform->bind($request->getParameter($this->filterform->getName()));
- $this->filterform->disableCSRFProtection();
- $query = $this->filterform->buildQuery($this->filterform->getValues());
- $this->shopprods->setQuery($query);
- $this->shopprods->getQuery();
- //preparing the variables to pass to the pag link
- $this->description = $request->getParameter($this->filterform->getName());
- $this->description = $this->description["description"]["text"];
- } else {
- if ($request->hasParameter("description")){
- $this->description = $request->getParameter("description");
- }
- $this->shopprods->setQuery(Doctrine::getTable('ShopCat')->createQuery('p')
- ->select()
- ->from('shopprod p')
- ->leftJoin('p.shopcat c ON c.id=p.shopcat_id')
- ->leftJoin('p.shopcoin m ON m.id=p.shopcoin_id')
- //->leftJoin('p.shopcoins')
- );
- }
- sfContext::getInstance()->getUser()->setFlash('notice', 'Mobilier import Germania. Magazin Outlet online mobilier si tablouri.');
- $this->shopprods->setPage($request->getParameter('page', 1));
- $this->shopprods->init();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement