本文整理匯總了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