/** * Parse the page */ protected function parse() { // parse the datagrid for all products $this->tpl->assign('dgProducts', $this->dgProducts->getNumResults() != 0 ? $this->dgProducts->getContent() : false); // get categories $categories = BackendCatalogModel::getCategories(true); // multiple categories? if (count($categories) > 1) { // create form $frm = new BackendForm('filter', null, 'get', true); // create element $frm->addDropdown('category', $categories, $this->categoryId); $frm->getField('category')->setDefaultElement(''); // parse the form $frm->parse($this->tpl); } // parse category if (!empty($this->category)) { $this->tpl->assign('filterCategory', $this->category); } }
/** * Retrieve the parsed output. * * @return string */ public function getContent() { // mass action was set if ($this->tpl->getAssignedValue('massAction') !== null) { $this->tpl->assign('footer', true); } elseif ($this->getPaging() && $this->getNumResults() > $this->getPagingLimit()) { // has paging & more than 1 page $this->tpl->assign('footer', true); } // set the odd and even classes $this->setOddRowAttributes(array('class' => 'odd')); $this->setEvenRowAttributes(array('class' => 'even')); // enable greying out $this->enableGreyingOut(); // execute parent return parent::getContent(); }
/** * Retrieve the parsed output. * * @return string */ public function getContent() { // mass action was set if ($this->tpl->getAssignedValue('massAction') !== null) { $this->tpl->assign('footer', true); } elseif ($this->getPaging() && $this->getNumResults() > $this->getPagingLimit()) { $this->tpl->assign('footer', true); } // execute parent return parent::getContent(); }