Ejemplo n.º 1
0
 /**
  *
  * @param sfWebRequest $request
  */
 protected function executeNewAccountTransaction(sfWebRequest $request)
 {
     ParametersConfiguration::setUserPrefix(sfContext::getInstance()->getUser()->getAttribute('login'));
     $user_id = $request->getParameter('users_id', array());
     $user_id = $user_id[0];
     //Create a new ImputationAccountTransaction object in order to predefine the form:
     $transaction = new ImputationAccountTransaction();
     $transaction->preConfigure($user_id, sfContext::getInstance()->getUser()->getAttribute('userId'));
     //Create the form:
     $this->form = new ImputationAccountTransactionForm($transaction, array('culture' => ParametersConfiguration::getDefault('default_language')));
     //Get the user accounts in order to be able to display their values and unities:
     $this->user_account_values = ImputationAccountTransaction::getUserAccountValues($user_id);
     $this->user_account_unities = ImputationAccountTransaction::getUserAccountUnities($user_id);
     $this->error_account = false;
     $this->display_secondary = false;
 }