本文整理汇总了PHP中ilObjStyleSheet::_getClonableContentStyles方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjStyleSheet::_getClonableContentStyles方法的具体用法?PHP ilObjStyleSheet::_getClonableContentStyles怎么用?PHP ilObjStyleSheet::_getClonableContentStyles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjStyleSheet
的用法示例。
在下文中一共展示了ilObjStyleSheet::_getClonableContentStyles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createObject
/**
* create
*/
function createObject()
{
global $rbacsystem, $lng, $tpl, $ilHelp;
$forms = array();
$ilHelp->setScreenIdComponent("sty");
$ilHelp->setDefaultScreenId(ilHelpGUI::ID_PART_SCREEN, "create");
// --- create
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt("sty_create_new_stylesheet"));
// title
$ti = new ilTextInputGUI($this->lng->txt("title"), "style_title");
$ti->setMaxLength(128);
$ti->setSize(40);
$ti->setRequired(true);
$form->addItem($ti);
// description
$ta = new ilTextAreaInputGUI($this->lng->txt("description"), "style_description");
$ta->setCols(40);
$ta->setRows(2);
$form->addItem($ta);
$form->addCommandButton("save", $this->lng->txt("save"));
$form->addCommandButton("cancel", $this->lng->txt("cancel"));
$forms[] = $form;
// --- import
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt("sty_import_stylesheet"));
// title
$ti = new ilFileInputGUI($this->lng->txt("import_file"), "stylefile");
$ti->setRequired(true);
$form->addItem($ti);
$form->addCommandButton("importStyle", $this->lng->txt("import"));
$form->addCommandButton("cancel", $this->lng->txt("cancel"));
$forms[] = $form;
// --- clone
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt("sty_copy_other_stylesheet"));
// source
$ti = new ilSelectInputGUI($this->lng->txt("sty_source"), "source_style");
$ti->setRequired(true);
$ti->setOptions(ilObjStyleSheet::_getClonableContentStyles());
$form->addItem($ti);
$form->addCommandButton("copyStyle", $this->lng->txt("copy"));
$form->addCommandButton("cancel", $this->lng->txt("cancel"));
$forms[] = $form;
$this->tpl->setContent($this->getCreationFormsHTML($forms));
}