Ejemplo n.º 1
0
 /**
  * Method to display the view.
  *
  * @param   string	The template file to include
  * @since   1.6
  */
 function render()
 {
     $layout = $this->getLayout();
     $accountForm = new DdcbalanceitModelsDdcaccount();
     $accountModel = new DdcbalanceitModelsDdcaccounts();
     $balanceModel = new DdcbalanceitModelsDdcbalances();
     $balanceForm = new DdcbalanceitModelsDdcbalance();
     $targbalForm = new DdcbalanceitModelsDdctarget();
     switch ($layout) {
         case "default":
         default:
             $this->item = $accountModel->getItem();
             $this->balances = $balanceModel->listItems();
             $this->form = $balanceForm->getForm();
             $this->formtb = $targbalForm->getForm();
             $this->balance = $balanceModel->getItem();
             break;
         case "add":
             $this->form = $accountForm->getForm();
             break;
         case "addbalance":
             $this->item = $accountModel->getItem();
             $this->form = $balanceForm->getForm();
             $this->balance = $balanceModel->getItem();
             break;
     }
     //display
     return parent::render();
 }
Ejemplo n.º 2
0
 /**
  * Method to display the view.
  *
  * @param   string	The template file to include
  * @since   1.6
  */
 function render()
 {
     $layout = $this->getLayout();
     $ddcaccountsModel = new DdcbalanceitModelsDdcaccounts();
     $ddcgoalsModel = new DdcbalanceitModelsDdcgoals();
     switch ($layout) {
         case "default":
         default:
             $this->items = $ddcaccountsModel->listItems();
             $this->goals = $ddcgoalsModel->listItems();
             break;
     }
     //display
     return parent::render();
 }