本文整理汇总了PHP中ilObjStyleSheet::setTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjStyleSheet::setTitle方法的具体用法?PHP ilObjStyleSheet::setTitle怎么用?PHP ilObjStyleSheet::setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjStyleSheet
的用法示例。
在下文中一共展示了ilObjStyleSheet::setTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ilClone
/**
* clone style sheet (note: styles have no ref ids and return an object id)
*
* @access public
* @return integer new obj id
*/
function ilClone()
{
global $log, $lng;
$lng->loadLanguageModule("style");
$new_obj = new ilObjStyleSheet();
$new_obj->setTitle($this->getTitle() . " (" . $lng->txt("sty_acopy") . ")");
$new_obj->setType($this->getType());
$new_obj->setDescription($this->getDescription());
$new_obj->create($this->getId());
$new_obj->writeStyleSetting("disable_auto_margins", $this->lookupStyleSetting("disable_auto_margins"));
return $new_obj->getId();
}
示例2: saveObject
/**
* save style sheet
*/
function saveObject()
{
if (!trim($_POST["style_title"])) {
$this->ctrl->redirect($this, "create");
}
//echo "HH"; exit;
$class_name = "ilObjStyleSheet";
require_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$newObj = new ilObjStyleSheet();
$newObj->setTitle("-");
$newObj->create();
$newObj->setTitle(ilUtil::stripSlashes($_POST["style_title"]));
$newObj->setDescription(ilUtil::stripSlashes($_POST["style_description"]));
$newObj->update();
// assign style to style sheet folder,
// if parent is style sheet folder
if ($_GET["ref_id"] > 0) {
$fold =& ilObjectFactory::getInstanceByRefId($_GET["ref_id"]);
if ($fold->getType() == "stys") {
$fold->addStyle($newObj->getId());
$fold->update();
ilObjStyleSheet::_writeStandard($newObj->getId(), "1");
$this->ctrl->redirectByClass("ilobjstylesettingsgui", "editContentStyles");
}
}
return $newObj->getId();
}