本文整理汇总了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());
}