public function getProducts() { if ($this->_products == null) { $productMapper = new Application_Model_Mapper_Product(); $this->_products = $productMapper->getListByCategoryId($this->_id); } return $this->_products; }
public function allproductsAction() { $productMapper = new Application_Model_Mapper_Product(); $this->view->products = $productMapper->getList(); }