public function addShowAction() { $service_showForm = new Application_Service_ShowFormService(null); //$service_show = new Application_Service_ShowService(); $js = $this->_getParam('data'); $data = array(); //need to convert from serialized jQuery array. foreach ($js as $j) { $data[$j["name"]] = $j["value"]; } $service_show = new Application_Service_ShowService(null, $data); // TODO: move this to js $data['add_show_hosts'] = $this->_getParam('hosts'); $data['add_show_day_check'] = $this->_getParam('days'); if ($data['add_show_day_check'] == "") { $data['add_show_day_check'] = null; } $forms = $this->createShowFormAction(); $this->view->addNewShow = true; if ($service_showForm->validateShowForms($forms, $data)) { $service_show->addUpdateShow($data); //send new show forms to the user $this->createShowFormAction(true); $this->view->newForm = $this->view->render('schedule/add-show-form.phtml'); Logging::debug("Show creation succeeded"); } else { $this->view->form = $this->view->render('schedule/add-show-form.phtml'); Logging::debug("Show creation failed"); } }