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