Exemple #1
0
 function populate()
 {
     $collection = new WHActionCollection();
     $collection->setParams();
     $sh = new SearchHandler($collection);
     $sh->addConstraint(new Constraint('type', '=', 'M'));
     $this->setSearchLimit($sh);
     $sh->setOrderBy('position');
     $collection->load($sh);
     $this->contents = $collection;
 }
 public function actionsMenu()
 {
     $this->view->set('clickaction', 'new');
     $this->view->set('clickcontroller', 'STTransactions');
     $this->view->set('linkfield', 'whaction_id');
     $this->view->set('linkvaluefield', 'id');
     $collection = new WHActionCollection($this->_templateobject);
     $sh = new SearchHandler($collection, false);
     $sh->extract();
     $sh->addConstraint(new Constraint('type', '=', 'M'));
     $sh->extractOrdering();
     $sh->extractPaging();
     $collection->load($sh);
     $this->view->set('whactions', $collection);
     $this->view->set('num_pages', $collection->num_pages);
     $this->view->set('cur_page', $collection->cur_page);
 }