public function editAction() { SxCms_Acl::requireAcl('block', 'block.edit'); $proxy = new SxModule_Contentblock_Proxy(); $block = $proxy->getById((int) $this->_getParam('id'), $_SESSION['System']['lng']); $block->setTmx($this->tmx); if ($this->getRequest()->isPost()) { $mapper = new SxModule_Contentblock_Mapper(); $fields = $mapper->fromInput($this->_getAllParams(), $this->_editablefields()); $data = $mapper->toObject($fields, $block); $validator = new SxModule_Contentblock_Validator(); if ($validator->validate($data)) { $block->save($this->_editablefields()); $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->_('contentblockedited')); $this->_helper->redirector->gotoSimple('index', 'contentblock'); } $item = $data; } $this->view->block = $block; $this->view->hidden = 'hidden'; $this->view->messages = Sanmax_MessageStack::getInstance('SxModule_Contentblock'); }