/** * 导航修改处理器 * * @return void */ public function doeditAction() { $keys = array('navid', 'type', 'parentid', 'name', 'link', 'fontColor', 'fontBold', 'fontItalic', 'fontUnderline', 'alt', 'target', 'orderid', 'isshow'); list($navid, $type, $parentid, $name, $link, $fontColor, $fontBold, $fontItalic, $fontUnderline, $alt, $target, $orderid, $isshow) = $this->getInput($keys, 'post'); $router = Wind::getComponent('router')->getRoute('pw')->matchUrl($link); if (!$name || !$type) { $this->showError("ADMIN:nav.add.fail.strlen.name"); } Wekit::load('SRV:nav.dm.PwNavDm'); $dm = new PwNavDm($navid); $dm->setType($type)->setParentid($parentid)->setName($name)->setLink($link)->setStyle($fontColor, $fontBold, $fontItalic, $fontUnderline)->setAlt($alt)->setTarget($target)->setOrderid($orderid)->setIsshow($isshow); if ($type != 'my') { $dm->setSign($router); } $resource = $this->_getNavDs()->updateNav($dm); if ($resource instanceof PwError) { $this->showError($resource->getError()); } $this->_getNavService()->updateConfig(); $this->showMessage('ADMIN:success'); }