Exemplo n.º 1
0
 public function postAction()
 {
     $account_group_dao = new AccountGroupDao('account_group');
     $account_group = array();
     $account_group['name'] = $this->getRequest()->getParam('name');
     $config_list = $this->getRequest()->getParam('config');
     $account_group_id = $account_group_dao->insertOne($account_group);
     $config_dao = new ConfigDao();
     foreach ($config_list as $key => $value) {
         $config_dao->insertOne(array('value' => $value, 'name' => $key, 'account_group_id' => $account_group_id));
     }
     $this->redirect('/account-group');
 }