当前位置: 首页>>代码示例>>PHP>>正文


PHP ilObjFile::getFilename方法代码示例

本文整理汇总了PHP中ilObjFile::getFilename方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjFile::getFilename方法的具体用法?PHP ilObjFile::getFilename怎么用?PHP ilObjFile::getFilename使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilObjFile的用法示例。


在下文中一共展示了ilObjFile::getFilename方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: updateFileContents

 /**
  * update file according to filename and version and create history entry
  * has to be called after (!) file save for new objects, since file storage will be initialised with obj id.
  *
  */
 public function updateFileContents()
 {
     if ($this->setFileContents()) {
         require_once "./Services/History/classes/class.ilHistory.php";
         ilHistory::_createEntry($this->file->getId(), "replace", $this->file->getFilename() . "," . $this->file->getVersion());
         $this->file->addNewsNotification("file_updated");
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:13,代码来源:class.ilFileXMLParser.php

示例2: getMaterialInfo

 /**
  * Get material file name and goto url
  * 
  * @param int $a_wsp_id
  * @return array caption, url 
  */
 function getMaterialInfo($a_wsp_id)
 {
     global $ilUser;
     if (!$this->ws_tree) {
         include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
         include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
         $this->ws_tree = new ilWorkspaceTree($ilUser->getId());
         $this->ws_access = new ilWorkspaceAccessHandler($caption);
     }
     $obj_id = $this->ws_tree->lookupObjectId($a_wsp_id);
     $caption = ilObject::_lookupTitle($obj_id);
     if (!$this->offline_mode) {
         $url = $this->ws_access->getGotoLink($a_wsp_id, $obj_id);
     } else {
         $url = $this->offline_mode . "file_" . $obj_id . "/";
         // all possible material types for now
         switch (ilObject::_lookupType($obj_id)) {
             case "tstv":
                 include_once "Modules/Test/classes/class.ilObjTestVerification.php";
                 $obj = new ilObjTestVerification($obj_id, false);
                 $url .= $obj->getOfflineFilename();
                 break;
             case "excv":
                 include_once "Modules/Exercise/classes/class.ilObjExerciseVerification.php";
                 $obj = new ilObjExerciseVerification($obj_id, false);
                 $url .= $obj->getOfflineFilename();
                 break;
             case "file":
                 $file = new ilObjFile($obj_id, false);
                 $url .= $file->getFilename();
                 break;
         }
     }
     return array($caption, $url);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:41,代码来源:class.ilPersonalSkillsGUI.php


注:本文中的ilObjFile::getFilename方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。