Exemplo n.º 1
0
 /**
  * Group configuration form
  *
  * @return array|\Zend\Http\Response array(form, group) or redirect response
  */
 public function configurationAction()
 {
     $this->setActiveMenu('Groups');
     $this->_clientConfigForm->setClientObject($this->_currentGroup);
     if ($this->getRequest()->isPost()) {
         $this->_clientConfigForm->setData($this->params()->fromPost());
         if ($this->_clientConfigForm->isValid()) {
             $this->_clientConfigForm->process();
             return $this->redirectToRoute('group', 'configuration', array('name' => $this->_currentGroup['Name']));
         }
     } else {
         $this->_clientConfigForm->setData($this->_currentGroup->getAllConfig());
     }
     return array('group' => $this->_currentGroup, 'form' => $this->_clientConfigForm);
 }