本文整理匯總了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());
}
}
示例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;
}
示例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;
}