public function addAction() { SxCms_Acl::requireAcl('block', 'block.add'); $item = new SxModule_Contentblock(); $item->setTmx($this->tmx); if ($this->getRequest()->isPost()) { $mapper = new SxModule_Contentblock_Mapper(); $fields = $mapper->fromInput($this->_getAllParams(), $this->_editablefields()); $data = $mapper->toObject($fields); $validator = new SxModule_Contentblock_Validator(); if ($validator->validate($data)) { $data->save(); $cache = Zend_Registry::get('cache'); $cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array('SxModule_Contentblock')); $flashMessenger = $this->_helper->getHelper('FlashMessenger'); $flashMessenger->addMessage($this->admin_tmx->_('contentblockcreated')); $this->_helper->redirector->gotoSimple('index', 'contentblock'); } $item = $data; } $this->view->messages = Sanmax_MessageStack::getInstance('SxModule_Contentblock'); $this->view->block = $item; }