本文整理汇总了PHP中ilObjectGUI::setTitleAndDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjectGUI::setTitleAndDescription方法的具体用法?PHP ilObjectGUI::setTitleAndDescription怎么用?PHP ilObjectGUI::setTitleAndDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjectGUI
的用法示例。
在下文中一共展示了ilObjectGUI::setTitleAndDescription方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setTitleAndDescription
/**
* called by prepare output
*/
function setTitleAndDescription()
{
parent::setTitleAndDescription();
$this->tpl->setDescription($this->object->getDescription());
}
示例2: setTitleAndDescription
/**
* called by prepare output
*/
function setTitleAndDescription()
{
parent::setTitleAndDescription();
if ($_GET["q_id"] > 0) {
include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
$q_gui = assQuestionGUI::_getQuestionGUI("", $_GET["q_id"]);
if ($q_gui->object instanceof assQuestion) {
$q_gui->object->setObjId($this->object->getId());
$title = $q_gui->object->getTitle();
if (!$title) {
$title = $this->lng->txt('new') . ': ' . assQuestion::_getQuestionTypeName($q_gui->object->getQuestionType());
}
$this->tpl->setTitle($title);
$this->tpl->setDescription($q_gui->object->getComment());
if ($this->object instanceof ilObjectPlugin) {
$this->tpl->setTitleIcon($this->object->plugin->getImagePath("icon_" . $this->object->getType() . ".svg"), $this->lng->txt("obj_" . $this->object->getType()));
} else {
$this->tpl->setTitleIcon(ilObject::_getIcon("", "big", $this->object->getType()));
}
} else {
// Workaround for context issues: If no object was found, redirect without q_id parameter
$this->ctrl->setParameter($this, 'q_id', '');
$this->ctrl->redirect($this);
}
} else {
$this->tpl->setTitle($this->object->getTitle());
$this->tpl->setDescription($this->object->getLongDescription());
$this->tpl->setTitleIcon(ilObject::_getIcon("", "big", $this->object->getType()));
}
}
示例3: setTitleAndDescription
protected function setTitleAndDescription()
{
return parent::setTitleAndDescription();
}
示例4: getTemplate
function getTemplate()
{
$this->tpl->getStandardTemplate();
$title = $this->object->getTitle();
if ($this->term_id > 0) {
$this->tpl->setTitle($this->lng->txt("term") . ": " . ilGlossaryTerm::_lookGlossaryTerm($this->term_id));
} else {
parent::setTitleAndDescription();
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
$this->tpl->setTitle($this->lng->txt("glo") . ": " . $title);
}
}
示例5: setTabs
/**
* output tabs
*/
function setTabs($a_act = "")
{
global $lng, $ilHelp;
$ilHelp->setScreenIdComponent("lm");
$this->addTabs($a_act);
parent::setTitleAndDescription();
$this->tpl->setTitle($this->object->getTitle());
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"), $lng->txt("obj_lm"));
}
示例6: setTitleAndDescription
function setTitleAndDescription()
{
if (strtolower(get_class($this->object)) == 'ilobjuser') {
$this->tpl->setTitle('[' . $this->object->getLogin() . '] ' . $this->object->getTitle());
$this->tpl->setDescription($this->object->getLongDescription());
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_" . $this->object->getType() . ".svg"), $this->lng->txt("obj_" . $this->object->getType()));
} else {
parent::setTitleAndDescription();
}
}