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


PHP ilLMObject::getObjectList方法代碼示例

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


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

示例1: getXmlExportTailDependencies

 /**
  * Get tail dependencies
  *
  * @param		string		entity
  * @param		string		target release
  * @param		array		ids
  * @return		array		array of array with keys "component", entity", "ids"
  */
 function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
 {
     if ($a_target_release == "4.3.0") {
         if ($a_entity == "help") {
             $lm_node_ids = array();
             include_once "./Modules/LearningModule/classes/class.ilLMObject.php";
             foreach ($a_ids as $lm_id) {
                 $chaps = ilLMObject::getObjectList($lm_id, "st");
                 foreach ($chaps as $chap) {
                     $lm_node_ids[] = $chap["obj_id"];
                 }
             }
             return array(array("component" => "Services/Help", "entity" => "help_map", "ids" => $lm_node_ids), array("component" => "Services/Help", "entity" => "help_tooltip", "ids" => $a_ids));
         }
     }
     return array();
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:25,代碼來源:class.ilHelpExporter.php

示例2: getPageList

 /**
  * static
  */
 function getPageList($lm_id)
 {
     return ilLMObject::getObjectList($lm_id, "pg");
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:7,代碼來源:class.ilLMPageObject.php

示例3: importFromZipFile

 /**
  * Import lm from zip file
  *
  * @param
  * @return
  */
 function importFromZipFile($a_tmp_file, $a_filename, $a_validate = true, $a_import_into_help_module = 0)
 {
     global $lng;
     // create import directory
     $this->createImportDirectory();
     // copy uploaded file to import directory
     $file = pathinfo($a_filename);
     $full_path = $this->getImportDirectory() . "/" . $a_filename;
     ilUtil::moveUploadedFile($a_tmp_file, $a_filename, $full_path);
     // unzip file
     ilUtil::unzip($full_path);
     $subdir = basename($file["basename"], "." . $file["extension"]);
     $mess = $this->importFromDirectory($this->getImportDirectory() . "/" . $subdir, $a_validate);
     // this should only be true for help modules
     if ($a_import_into_help_module > 0) {
         // search the zip file
         $dir = $this->getImportDirectory() . "/" . $subdir;
         $files = ilUtil::getDir($dir);
         foreach ($files as $file) {
             if (is_int(strpos($file["entry"], "__help_")) && is_int(strpos($file["entry"], ".zip"))) {
                 include_once "./Services/Export/classes/class.ilImport.php";
                 $imp = new ilImport();
                 $imp->getMapping()->addMapping('Services/Help', 'help_module', 0, $a_import_into_help_module);
                 include_once "./Modules/LearningModule/classes/class.ilLMObject.php";
                 $chaps = ilLMObject::getObjectList($this->getId(), "st");
                 foreach ($chaps as $chap) {
                     $chap_arr = explode("_", $chap["import_id"]);
                     $imp->getMapping()->addMapping('Services/Help', 'help_chap', $chap_arr[count($chap_arr) - 1], $chap["obj_id"]);
                 }
                 $imp->importEntity($dir . "/" . $file["entry"], $file["entry"], "help", "Services/Help", true);
             }
         }
     }
     // delete import directory
     ilUtil::delDir($this->getImportDirectory());
     return $mess;
 }
開發者ID:Walid-Synakene,項目名稱:ilias,代碼行數:43,代碼來源:class.ilObjContentObject.php


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