public function build()
 {
     if ($this->request->hasParameter('type') && $this->request->getParameter('type') == 'save') {
         $params = $this->request->getPostParameters();
         unset($params['type']);
         $params['autodeploy'] = !isset($params['autodeploy']) ? false : true;
         $params['url'] = afStudioUtil::getHost();
         $this->setProjectParams($params);
         afStudioUtil::writeFile($this->projectConfFilePath, $this->dumpYaml($this->projectConfTemplate));
         $result['success'] = true;
         $result['message'] = 'Project Settings saved successfully';
         afsNotificationPeer::log('Project Settings have been modified', 'afStudioConf');
     } else {
         $result['success'] = true;
         $result['data'] = $this->getProjectParams();
     }
     return json_encode($result);
 }