当前位置: 首页>>代码示例>>PHP>>正文


PHP GroupManager::show_parent_menu方法代码示例

本文整理汇总了PHP中GroupManager::show_parent_menu方法的典型用法代码示例。如果您正苦于以下问题:PHP GroupManager::show_parent_menu方法的具体用法?PHP GroupManager::show_parent_menu怎么用?PHP GroupManager::show_parent_menu使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GroupManager的用法示例。


在下文中一共展示了GroupManager::show_parent_menu方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: job_accountmanager

/** main entry point for accountmanager (called from admin.php)
 *
 * this routing dispatches the tasks. If a specified task is not
 * recognised, the default task TASK_ACCOUNTS_OVERVIEW is
 * executed. Note that the User Manager and the Group Manager
 * are heavily interconnected. Therefore we use 1 common set
 * of tasks and distinguish between both managers via
 * sets of tasks, e.g. TASK_USER* point to the user manager
 * where TASK_GROUP* lead to the group manager.
 * 
 * @param object &$output collects the html output
 * @return void results are returned as output in $output
 */
function job_accountmanager(&$output)
{
    global $CFG;
    $output->set_helptopic('accountmanager');
    $task = get_parameter_string('task', TASK_ACCOUNTS);
    switch ($task) {
        case TASK_ACCOUNTS:
            show_accounts_intro($output);
            show_accounts_menu($output);
            break;
        case TASK_USERS:
        case TASK_USER_ADD:
        case TASK_USER_DELETE:
        case TASK_USER_EDIT:
        case TASK_USER_ADVANCED:
        case TASK_USER_GROUPS:
        case TASK_USER_GROUPADD:
        case TASK_USER_GROUPDELETE:
        case TASK_USER_GROUPSAVE:
        case TASK_USER_INTRANET:
        case TASK_USER_MODULE:
        case TASK_USER_ADMIN:
        case TASK_USER_PAGEMANAGER:
        case TASK_USER_TREEVIEW:
        case TASK_USER_SAVE:
        case TASK_USER_SAVE_NEW:
            include $CFG->progdir . '/lib/usermanager.class.php';
            $mgr = new UserManager($output);
            if ($mgr->show_parent_menu()) {
                show_accounts_menu($output, TASK_USERS);
            }
            break;
        case TASK_GROUPS:
        case TASK_GROUP_ADD:
        case TASK_GROUP_DELETE:
        case TASK_GROUP_EDIT:
        case TASK_GROUP_SAVE:
        case TASK_GROUP_SAVE_NEW:
            include $CFG->progdir . '/lib/groupmanager.class.php';
            $mgr = new GroupManager($output);
            if ($mgr->show_parent_menu()) {
                show_accounts_menu($output, TASK_GROUPS);
            }
            break;
        case TASK_GROUP_CAPACITY_OVERVIEW:
        case TASK_GROUP_CAPACITY_INTRANET:
        case TASK_GROUP_CAPACITY_MODULE:
        case TASK_GROUP_CAPACITY_ADMIN:
        case TASK_GROUP_CAPACITY_PAGEMANAGER:
        case TASK_GROUP_CAPACITY_SAVE:
            include $CFG->progdir . '/lib/groupmanager.class.php';
            $mgr = new GroupManager($output);
            if ($mgr->show_parent_menu()) {
                show_accounts_menu($output, TASK_GROUPS);
            }
            break;
        default:
            $s = utf8_strlen($task) <= 50 ? $task : utf8_substr($task, 0, 44) . ' (...)';
            $message = t('task_unknown', 'admin', array('{TASK}' => htmlspecialchars($s)));
            $output->add_message($message);
            logger('accountmanager: unknown task: ' . htmlspecialchars($s));
            show_accounts_intro($output);
            show_accounts_menu($output);
            break;
    }
}
开发者ID:BackupTheBerlios,项目名称:websiteatschool,代码行数:79,代码来源:accountmanagerlib.php


注:本文中的GroupManager::show_parent_menu方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。