本文整理汇总了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();
}
示例2: getPageList
/**
* static
*/
function getPageList($lm_id)
{
return ilLMObject::getObjectList($lm_id, "pg");
}
示例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;
}