/** * 增加角色 * @return NULL|boolean */ public function addAction() { if ($this->isPost()) { $aRole = $this->_checkData(); if (empty($aRole)) { return null; } if (Model_Role::addData($aRole) > 0) { return $this->showMsg('角色增加成功!', true); } else { return $this->showMsg('角色增加失败!', false); } } else { $this->assign('aPermissionList', Model_Permission::getAllPermissions()); $this->assign('aMenuList', Model_Menu::getMenus()); } }