当前位置: 首页>>代码示例>>PHP>>正文


PHP ilTemplate::getMessageHTML方法代码示例

本文整理汇总了PHP中ilTemplate::getMessageHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP ilTemplate::getMessageHTML方法的具体用法?PHP ilTemplate::getMessageHTML怎么用?PHP ilTemplate::getMessageHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilTemplate的用法示例。


在下文中一共展示了ilTemplate::getMessageHTML方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendFailure

 /**
  * @param $message
  */
 protected function sendFailure($message)
 {
     $keep = $this->ctrl->isAsynch() ? false : true;
     $this->form->setValuesByPost();
     if ($this->ctrl->isAsynch()) {
         echo $this->tpl->getMessageHTML($message, 'failure') . $this->form->getHTML();
         exit;
     } else {
         ilUtil::sendFailure($message, $keep);
         $this->tpl->setContent($this->form->getHTML());
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilDataCollectionRecordEditGUI.php

示例2: getHTML

 /**
  * Get HTML
  *
  * @param
  * @return
  */
 function getHTML()
 {
     global $lng, $ilCtrl;
     $lng->loadLanguageModule("tagging");
     $tpl = new ilTemplate("tpl.edit_tags.html", true, true, "Services/Tagging");
     $tpl->setVariable("TXT_TAGS", $lng->txt("tagging_tags"));
     switch ($_GET["mess"] != "" ? $_GET["mess"] : $this->mess) {
         case "mod":
             $mtype = "success";
             $mtxt = $lng->txt("msg_obj_modified");
             break;
     }
     if ($mtxt != "") {
         $tpl->setVariable("MESS", $tpl->getMessageHTML($mtxt, $mtype));
     } else {
         $tpl->setVariable("MESS", "");
     }
     $img = ilUtil::img(ilObject::_getIcon($this->obj_id, "tiny"));
     $tpl->setVariable("TXT_OBJ_TITLE", $img . " " . ilObject::_lookupTitle($this->obj_id));
     $tags = ilTagging::getTagsForUserAndObject($this->obj_id, $this->obj_type, $this->sub_obj_id, $this->sub_obj_type, $this->getUserId());
     $tpl->setVariable("VAL_TAGS", ilUtil::prepareFormOutput(implode($tags, " ")));
     $tpl->setVariable("TXT_SAVE", $lng->txt("save"));
     $tpl->setVariable("CMD_SAVE", "saveJS");
     $os = "ilTagging.cmdAjaxForm(event, '" . $ilCtrl->getFormActionByClass("iltagginggui", "", "", true) . "');";
     $tpl->setVariable("ON_SUBMIT", $os);
     echo $tpl->get();
     exit;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:34,代码来源:class.ilTaggingGUI.php

示例3: getHTML

 /**
  * Get HTML
  *
  * @param
  * @return
  */
 function getHTML()
 {
     global $lng, $ilCtrl;
     $lng->loadLanguageModule("tagging");
     $tpl = new ilTemplate("tpl.edit_tags.html", true, true, "Services/Tagging");
     $tpl->setVariable("TXT_TAGS", $lng->txt("tagging_tags"));
     switch ($_GET["mess"] != "" ? $_GET["mess"] : $this->mess) {
         case "mod":
             $mtype = "success";
             $mtxt = $lng->txt("msg_obj_modified");
             break;
     }
     if ($mtxt != "") {
         $tpl->setVariable("MESS", $tpl->getMessageHTML($mtxt, $mtype));
     } else {
         $tpl->setVariable("MESS", "");
     }
     $img = ilUtil::img(ilObject::_getIcon($this->obj_id, "tiny"));
     $tpl->setVariable("TXT_OBJ_TITLE", $img . " " . ilObject::_lookupTitle($this->obj_id));
     $tags = ilTagging::getTagsForUserAndObject($this->obj_id, $this->obj_type, $this->sub_obj_id, $this->sub_obj_type, $this->getUserId());
     $tpl->setVariable("VAL_TAGS", ilUtil::prepareFormOutput(implode($tags, " ")));
     $tpl->setVariable("TXT_SAVE", $lng->txt("save"));
     $tpl->setVariable("CMD_SAVE", "saveJS");
     $os = "ilTagging.cmdAjaxForm(event, '" . $ilCtrl->getFormActionByClass("iltagginggui", "", "", true) . "');";
     $tpl->setVariable("ON_SUBMIT", $os);
     $tags_set = new ilSetting("tags");
     if ($tags_set->get("enable_all_users")) {
         $tpl->setVariable("TAGS_TITLE", $lng->txt("tagging_my_tags"));
         $all_obj_tags = ilTagging::_getListTagsForObjects(array($this->obj_id));
         $all_obj_tags = $all_obj_tags[$this->obj_id];
         if (is_array($all_obj_tags) && sizeof($all_obj_tags) != sizeof($tags)) {
             $tpl->setVariable("TITLE_OTHER", $lng->txt("tagging_other_users"));
             $tpl->setCurrentBlock("tag_other_bl");
             foreach ($all_obj_tags as $tag => $is_owner) {
                 if (!$is_owner) {
                     $tpl->setVariable("OTHER_TAG", $tag);
                     $tpl->parseCurrentBlock();
                 }
             }
         }
     }
     echo $tpl->get();
     exit;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:50,代码来源:class.ilTaggingGUI.php


注:本文中的ilTemplate::getMessageHTML方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。