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


PHP ilLMObject::getType方法代碼示例

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


在下文中一共展示了ilLMObject::getType方法的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());
 }
開發者ID:Walid-Synakene,項目名稱:ilias,代碼行數:42,代碼來源:class.ilObjContentObjectGUI.php


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