Example #1
0
 public function createAction()
 {
     if ($this->getRequest()->isPost()) {
         $this->applicationForm->setData($this->getRequest()->getPost());
         if ($this->applicationForm->isValid()) {
             $data = $this->applicationForm->getData();
             $clientSecret = $this->applicationService->createApplicationFromArray($this->zourceAccount(), $data);
             $this->sessionContainer->clientSecret = $clientSecret;
             return $this->redirect()->toRoute('settings/applications');
         }
     }
     return new ViewModel(['applications' => $this->applicationService->getForAccount($this->zourceAccount()), 'applicationForm' => $this->applicationForm]);
 }