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


PHP UrlManager::get_access_url_from_user方法代码示例

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


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

示例1: array

 $conditions = array('username' => $keyword);
 $user_list = UserManager::get_user_list($conditions, array(), false, ' OR ');
 if (!empty($user_list)) {
     $extra_search_options = Display::page_subheader(get_lang('UsersFoundInOtherPortals'));
     $table = new HTML_Table(array('class' => 'data_table'));
     $column = 0;
     $row = 0;
     $headers = array(get_lang('User'), 'URL', get_lang('Actions'));
     foreach ($headers as $header) {
         $table->setHeaderContents($row, $column, $header);
         $column++;
     }
     $row++;
     foreach ($user_list as $user) {
         $column = 0;
         $access_info = UrlManager::get_access_url_from_user($user['id']);
         $access_info_to_string = '';
         $add_user = true;
         if (!empty($access_info)) {
             foreach ($access_info as $url_info) {
                 if ($current_access_url_id == $url_info['access_url_id']) {
                     $add_user = false;
                 }
                 $access_info_to_string .= $url_info['url'] . '<br />';
             }
         }
         if ($add_user) {
             $row_table = array();
             $row_table[] = api_get_person_name($user['firstname'], $user['lastname']) . ' (' . $user['username'] . ') ';
             $row_table[] = $access_info_to_string;
             $url = api_get_self() . '?action=add_user_to_my_url&user_id=' . $user['id'] . '&sec_token=' . $_SESSION['sec_token'];
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:user_list.php

示例2: array_merge

        $result = TrackingUserLogCSV::getToolInformation($user['user_id'], $courseInfo, 0);
        $courseToolInformationTotal .= $result['html'];
        $csvContent = array_merge($csvContent, $result['array']);
    }
    $courseInformation = Display::page_subheader(get_lang('Courses'));
    $courseInformation .= Display::return_sortable_table($header, $data, array(), array(), array('user_id' => intval($_GET['user_id'])));
    $courseInformation .= $courseToolInformationTotal;
} else {
    $courseInformation = '<p>' . get_lang('NoCoursesForThisUser') . '</p>';
}
/**
 * Show the URL in which this user is subscribed
 */
$urlInformation = null;
if (api_is_multiple_url_enabled()) {
    $urlList = UrlManager::get_access_url_from_user($user['user_id']);
    if (count($urlList) > 0) {
        $header = array();
        $header[] = array('URL', true);
        $data = array();
        $csvContent[] = array();
        $csvContent[] = array('Url');
        foreach ($urlList as $url) {
            $row = array();
            $row[] = Display::url($url['url'], $url['url']);
            $csvContent[] = array_map('strip_tags', $row);
            $data[] = $row;
        }
        $urlInformation = Display::page_subheader(get_lang('URLList'));
        $urlInformation .= Display::return_sortable_table($header, $data, array(), array(), array('user_id' => intval($_GET['user_id'])));
    } else {
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:user_information.php

示例3: WSGetPortalListFromUser

function WSGetPortalListFromUser($params)
{
    if (!WSHelperVerifyKey($params['secret_key'])) {
        return return_error(WS_ERROR_SECRET_KEY);
    }
    $userId = $params['user_id'];
    $result = UrlManager::get_access_url_from_user($userId);
    if (!empty($result)) {
        foreach ($result as &$data) {
            $data['id'] = $data['access_url_id'];
        }
    }
    return $result;
}
开发者ID:daffef,项目名称:chamilo-lms,代码行数:14,代码来源:access_url.php


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