本文整理匯總了PHP中ilLMObject::getTitle方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilLMObject::getTitle方法的具體用法?PHP ilLMObject::getTitle怎麽用?PHP ilLMObject::getTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilLMObject
的用法示例。
在下文中一共展示了ilLMObject::getTitle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: delete
/**
* confirm deletion screen for page object and structure object deletion
*
* @param int $a_parent_subobj_id id of parent object (structure object)
* of the objects, that should be deleted
* (or no parent object id for top level)
*/
function delete($a_parent_subobj_id = 0)
{
if (!isset($_POST["id"])) {
$this->ilias->raiseError($this->lng->txt("no_checkbox"), $this->ilias->error_obj->MESSAGE);
}
if (count($_POST["id"]) == 1 && $_POST["id"][0] == IL_FIRST_NODE) {
$this->ilias->raiseError($this->lng->txt("cont_select_item"), $this->ilias->error_obj->MESSAGE);
}
if ($a_parent_subobj_id == 0) {
$this->setTabs();
}
if ($a_parent_subobj_id != 0) {
$this->ctrl->setParameterByClass("ilStructureObjectGUI", "backcmd", $_GET["backcmd"]);
$this->ctrl->setParameterByClass("ilStructureObjectGUI", "obj_id", $a_parent_subobj_id);
$form_action = $this->ctrl->getFormActionByClass("ilStructureObjectGUI");
} else {
$this->ctrl->setParameter($this, "backcmd", $_GET["backcmd"]);
$form_action = $this->ctrl->getFormAction($this);
}
// display confirmation message
include_once "./Services/Utilities/classes/class.ilConfirmationGUI.php";
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($form_action);
$cgui->setHeaderText($this->lng->txt("info_delete_sure"));
$cgui->setCancel($this->lng->txt("cancel"), "cancelDelete");
$cgui->setConfirm($this->lng->txt("confirm"), "confirmedDelete");
foreach ($_POST["id"] as $id) {
if ($id != IL_FIRST_NODE) {
$obj = new ilLMObject($this->object, $id);
$caption = ilUtil::getImageTagByType($obj->getType(), $this->tpl->tplPath) . " " . $obj->getTitle();
$cgui->addItem("id[]", $id, $caption);
}
}
$this->tpl->setContent($cgui->getHTML());
}