本文整理汇总了PHP中DocumentManager::build_directory_selector方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentManager::build_directory_selector方法的具体用法?PHP DocumentManager::build_directory_selector怎么用?PHP DocumentManager::build_directory_selector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DocumentManager
的用法示例。
在下文中一共展示了DocumentManager::build_directory_selector方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: api_get_path
}
if (api_is_platform_admin()) {
if (api_get_configuration_value('document_manage_deleted_files')) {
$actionsLeft .= Display::url(get_lang('Recycle'), api_get_path(WEB_CODE_PATH) . 'document/recycle.php?' . api_get_cidreq(), array('class' => 'btn btn-default'));
}
}
if (!empty($moveTo)) {
$document_id = DocumentManager::get_document_id($courseInfo, $moveTo);
}
if (isset($_GET['createdir']) && isset($_POST['dirname']) && $_POST['dirname'] != '') {
$post_dir_name = $_POST['dirname'];
$document_id = DocumentManager::get_document_id($courseInfo, $_POST['dirname']);
}
$selector = null;
if (!$is_certificate_mode) {
$selector = DocumentManager::build_directory_selector($folders, $document_id, isset($group_properties['directory']) ? $group_properties['directory'] : array(), true);
}
if (($is_allowed_to_edit || $group_member_with_upload_rights) && count($documentAndFolders) > 1) {
$column_show[] = 1;
}
$column_show[] = 1;
$column_show[] = 1;
$column_show[] = 1;
$column_show[] = 1;
if ($is_allowed_to_edit || $group_member_with_upload_rights || DocumentManager::is_my_shared_folder(api_get_user_id(), $curdirpath, $sessionId)) {
$column_show[] = 1;
}
$column_show[] = 0;
$column_show[] = 0;
$column_order = array();
if (count($row) == 12) {
示例2: get_documents
/**
* Creates a list with all the documents in it
* @param bool $showInvisibleFiles
* @return string
*/
public function get_documents($showInvisibleFiles = false)
{
$course_info = api_get_course_info();
$sessionId = api_get_session_id();
$documentTree = DocumentManager::get_document_preview($course_info, $this->lp_id, null, $sessionId, true, null, null, $showInvisibleFiles, true);
$headers = array(get_lang('Files'), get_lang('NewDocument'), get_lang('Upload'));
$form = new FormValidator('form_upload', 'POST', api_get_self() . '?' . $_SERVER['QUERY_STRING'], '', array('enctype' => "multipart/form-data"));
$folders = DocumentManager::get_all_document_folders(api_get_course_info(), 0, true);
DocumentManager::build_directory_selector($folders, '', array(), true, $form, 'directory_parent_id');
$form->addElement('radio', 'if_exists', get_lang('UplWhatIfFileExists'), get_lang('UplDoNothing'), 'nothing');
$form->addElement('radio', 'if_exists', '', get_lang('UplOverwriteLong'), 'overwrite');
$form->addElement('radio', 'if_exists', '', get_lang('UplRenameLong'), 'rename');
$form->setDefaults(['if_exists' => 'rename']);
// Check box options
$form->addElement('checkbox', 'unzip', get_lang('Options'), get_lang('Uncompress'));
$url = api_get_path(WEB_AJAX_PATH) . 'document.ajax.php?' . api_get_cidreq() . '&a=upload_file&curdirpath=';
$form->addMultipleUpload($url);
$new = $this->display_document_form('add', 0);
$tabs = Display::tabs($headers, array($documentTree, $new, $form->returnForm()), 'subtab');
return $tabs;
}