本文整理汇总了PHP中DocumentManager::build_move_to_selector方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentManager::build_move_to_selector方法的具体用法?PHP DocumentManager::build_move_to_selector怎么用?PHP DocumentManager::build_move_to_selector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DocumentManager
的用法示例。
在下文中一共展示了DocumentManager::build_move_to_selector方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: api_get_user_id
if (DocumentManager::is_my_shared_folder(api_get_user_id(), $curdirpath, $sessionId) && !$is_allowed_to_edit) {
//only main user shared folder
$main_user_shared_folder_main = '/shared_folder/sf_user_' . api_get_user_id();
$main_user_shared_folder_sub = '/shared_folder\\/sf_user_' . api_get_user_id() . '\\//';
//all subfolders
$user_shared_folders = array();
foreach ($folders as $fold) {
if ($main_user_shared_folder_main == $fold || preg_match($main_user_shared_folder_sub, $fold)) {
$user_shared_folders[] = $fold;
}
}
$moveForm .= '<legend>' . get_lang('Move') . '</legend>';
$moveForm .= DocumentManager::build_move_to_selector($user_shared_folders, $move_path, $my_get_move, $group_properties['directory']);
} else {
$moveForm .= '<legend>' . get_lang('Move') . '</legend>';
$moveForm .= DocumentManager::build_move_to_selector($folders, $move_path, $my_get_move, $group_properties['directory']);
}
}
}
if (!empty($moveTo) && isset($_POST['move_file'])) {
if (!$is_allowed_to_edit) {
if (DocumentManager::check_readonly($courseInfo, api_get_user_id(), $_POST['move_file'])) {
api_not_allowed(true);
}
}
if (api_is_coach()) {
if (!DocumentManager::is_visible_by_id($_POST['move_file'], $courseInfo, $sessionId, api_get_user_id())) {
api_not_allowed(true);
}
}
// Get the document data from the ID