public function indexAction() { $clientSecret = null; if ($this->sessionContainer->clientSecret) { $clientSecret = $this->sessionContainer->clientSecret; $this->sessionContainer->clientSecret = null; } return new ViewModel(['applications' => $this->applicationService->getForAccount($this->zourceAccount()), 'clientSecret' => $clientSecret]); }
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]); }