當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ArtefactTypeFileBase::artefactchooser_folder_data方法代碼示例

本文整理匯總了PHP中ArtefactTypeFileBase::artefactchooser_folder_data方法的典型用法代碼示例。如果您正苦於以下問題:PHP ArtefactTypeFileBase::artefactchooser_folder_data方法的具體用法?PHP ArtefactTypeFileBase::artefactchooser_folder_data怎麽用?PHP ArtefactTypeFileBase::artefactchooser_folder_data使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ArtefactTypeFileBase的用法示例。


在下文中一共展示了ArtefactTypeFileBase::artefactchooser_folder_data方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: artefactchooser_get_element_data

 /**
  * Optional method. If specified, allows the blocktype class to munge the
  * artefactchooser element data before it's templated
  */
 public static function artefactchooser_get_element_data($artefact)
 {
     $folderdata = ArtefactTypeFileBase::artefactchooser_folder_data($artefact);
     $artefact->icon = call_static_method(generate_artefact_class_name($artefact->artefacttype), 'get_icon', array('id' => $artefact->id));
     $artefact->hovertitle = $artefact->description;
     $path = $artefact->parent ? ArtefactTypeFileBase::get_full_path($artefact->parent, $folderdata->data) : '';
     $artefact->description = str_shorten_text($folderdata->ownername . $path . $artefact->title, 30);
     return $artefact;
 }
開發者ID:agwells,項目名稱:Mahara-1,代碼行數:13,代碼來源:lib.php

示例2: pieform_element_filebrowser_get_path

function pieform_element_filebrowser_get_path($folder)
{
    $path = array();
    if ($folder) {
        $folders = ArtefactTypeFileBase::artefactchooser_folder_data(artefact_instance_from_id($folder))->data;
        $f = $folder;
        while ($f) {
            $path[] = (object) array('title' => $folders[$f]->title, 'id' => $f);
            $f = $folders[$f]->parent;
        }
    }
    $path[] = (object) array('title' => get_string('home', 'artefact.file'), 'id' => 0);
    return $path;
}
開發者ID:rboyatt,項目名稱:mahara,代碼行數:14,代碼來源:filebrowser.php

示例3: unzip_directory_name

 public function unzip_directory_name()
 {
     if (isset($this->data['unzipdir'])) {
         return $this->data['unzipdir'];
     }
     $folderdata = ArtefactTypeFileBase::artefactchooser_folder_data($this);
     $parent = $this->get('parent');
     $strpath = ArtefactTypeFileBase::get_full_path($parent, $folderdata->data);
     $extn = $this->get('oldextension');
     $name = $this->get('title');
     if (substr($name, -1 - strlen($extn)) == '.' . $extn) {
         $name = substr($name, 0, strlen($name) - 1 - strlen($extn));
     }
     $name = ArtefactTypeFileBase::get_new_file_title($name, $parent, $this->get('owner'), $this->get('group'), $this->get('institution'));
     $this->data['unzipdir'] = array('basename' => $name, 'fullname' => $strpath . $name);
     return $this->data['unzipdir'];
 }
開發者ID:vohung96,項目名稱:mahara,代碼行數:17,代碼來源:lib.php


注:本文中的ArtefactTypeFileBase::artefactchooser_folder_data方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。