当前位置: 首页>>代码示例>>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;未经允许,请勿转载。