sidemenu_links); } /************************************************************************** ************************************************************************** ************************************************************************** * action: view * - Displays information about a specific entry */ function view($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid Item.', true)); $this->redirect(array('controller' => 'accounts', 'action'=>'index')); } // Get the Entry and related fields $entry = $this->DoubleEntry->find ('first', array('contain' => array('DebitEntry', 'CreditEntry'), 'conditions' => array('DoubleEntry.id' => $id), )); // Prepare to render. $title = "Double Ledger Entry #{$entry['DoubleEntry']['id']}"; $this->set(compact('entry', 'title')); } }