public function editAction() { $this->userService->checkRightGate('CONTENT_EDIT'); $form = $this->formManager->initForm('scEditForm', dirname(__FILE__) . '/scForm.xml'); if ($form->isSubmit()) { if ($form->isValid()) { $sc = $form->getContainer('sc'); $this->staticContentService->save($sc); $this->forward('staticContent', 'sc', 'index', array('id' => $sc->id)); return; } } else { $id = $this->getParam('id', 0); if ($id == '') { $this->goHome(); return; } $sc = $this->staticContentService->get($id); if ($sc == null) { $sc = new \org\equinox\modules\staticContent\dao\StaticContentDto(); $sc->id = $id; //$this->forward('defaultLayout', 'index', 'home'); } $form->setContainer('sc', $sc); } $this->formManager->storeForm($form); $this->assign('form', $form); $this->assign('sc', $sc); }
public function save($cat) { $this->userService->checkRightGate('CONTENT_EDIT'); return $this->categoryDao->save($cat); }
public function save(dao\StaticContentDto $content) { $this->userService->checkRightGate('CONTENT_EDIT'); return $this->staticContentDao->save($content); }
public function listAll() { $this->userService->checkRightGate('CONTENT_EDIT'); return $this->contentDao->listAll(\org\equinox\modules\content\dao\ContentDto::STATE_ALL, 0, 0); }