public function view() { if (isset($this->_data['id'])) { $pp = new PeriodicPayment(); $pp->load($this->_data['id']); $this->view->set('periodicpayment', $pp); $sidebar = new SidebarController($this->view); $sidebarlist = array(); $sidebarlist['showall'] = array('tag' => 'View All Payments', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'index'))); $sidebar->addList('Actions', $sidebarlist); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); } else { sendTo($this->name, 'index', $this->_modules); } }