当前位置: 首页>>代码示例>>PHP>>正文


PHP ilObjStyleSheet::_getStandardStyles方法代码示例

本文整理汇总了PHP中ilObjStyleSheet::_getStandardStyles方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjStyleSheet::_getStandardStyles方法的具体用法?PHP ilObjStyleSheet::_getStandardStyles怎么用?PHP ilObjStyleSheet::_getStandardStyles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilObjStyleSheet的用法示例。


在下文中一共展示了ilObjStyleSheet::_getStandardStyles方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initStylePropertiesForm

 /**
  * Init style properties form
  */
 function initStylePropertiesForm()
 {
     global $ilCtrl, $lng, $ilTabs, $ilSetting, $tpl;
     $tpl->setTreeFlatIcon("", "");
     $ilTabs->clearTargets();
     $xpage_id = ilContainer::_lookupContainerSetting($this->object->getId(), "xhtml_page");
     if ($xpage_id > 0) {
         $ilTabs->setBackTarget($lng->txt("cntr_back_to_old_editor"), $ilCtrl->getLinkTarget($this, "switchToOldEditor"), "_top");
     } else {
         $ilTabs->setBackTarget($lng->txt("back"), "./goto.php?target=" . $this->object->getType() . "_" . $this->object->getRefId(), "_top");
     }
     include_once "./Services/Container/classes/class.ilContainerPageGUI.php";
     $page_gui = new ilContainerPageGUI($this->object->getId());
     $style_id = $this->object->getStyleSheetId();
     if (ilObject::_lookupType($style_id) == "sty") {
         $page_gui->setStyleId($style_id);
     } else {
         $style_id = 0;
     }
     $page_gui->setTabHook($this, "addPageTabs");
     $ilCtrl->getHTML($page_gui);
     $ilTabs->setTabActive("obj_sty");
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $lng->loadLanguageModule("style");
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $fixed_style = $ilSetting->get("fixed_content_style_id");
     //		$style_id = $this->object->getStyleSheetId();
     if ($fixed_style > 0) {
         $st = new ilNonEditableValueGUI($lng->txt("wiki_current_style"));
         $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" . $this->lng->txt("global_fixed") . ")");
         $this->form->addItem($st);
     } else {
         $st_styles = ilObjStyleSheet::_getStandardStyles(true, false, $_GET["ref_id"]);
         $st_styles[0] = $this->lng->txt("default");
         ksort($st_styles);
         if ($style_id > 0) {
             // individual style
             if (!ilObjStyleSheet::_lookupStandard($style_id)) {
                 $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
                 $st->setValue(ilObject::_lookupTitle($style_id));
                 $this->form->addItem($st);
                 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
                 // delete command
                 $this->form->addCommandButton("editStyle", $lng->txt("style_edit_style"));
                 $this->form->addCommandButton("deleteStyle", $lng->txt("style_delete_style"));
                 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
             }
         }
         if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
             $style_sel = ilUtil::formSelect($style_id, "style_id", $st_styles, false, true);
             $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
             $style_sel->setOptions($st_styles);
             $style_sel->setValue($style_id);
             $this->form->addItem($style_sel);
             //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
             $this->form->addCommandButton("saveStyleSettings", $lng->txt("save"));
             $this->form->addCommandButton("createStyle", $lng->txt("sty_create_ind_style"));
         }
     }
     $this->form->setTitle($lng->txt("obj_sty"));
     $this->form->setFormAction($ilCtrl->getFormAction($this));
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:66,代码来源:class.ilContainerGUI.php

示例2: initStylePropertiesForm

 function initStylePropertiesForm()
 {
     global $ilSetting;
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $this->lng->loadLanguageModule("style");
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $fixed_style = $ilSetting->get("fixed_content_style_id");
     $style_id = $this->object->getStyleSheetId();
     if ($fixed_style > 0) {
         $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
         $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" . $this->lng->txt("global_fixed") . ")");
         $form->addItem($st);
     } else {
         $st_styles = ilObjStyleSheet::_getStandardStyles(true, false, $_GET["ref_id"]);
         $st_styles[0] = $this->lng->txt("default");
         ksort($st_styles);
         if ($style_id > 0) {
             // individual style
             if (!ilObjStyleSheet::_lookupStandard($style_id)) {
                 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
                 $st->setValue(ilObject::_lookupTitle($style_id));
                 $form->addItem($st);
                 // delete command
                 $form->addCommandButton("editStyle", $this->lng->txt("style_edit_style"));
                 $form->addCommandButton("deleteStyle", $this->lng->txt("style_delete_style"));
             }
         }
         if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
             $style_sel = new ilSelectInputGUI($this->lng->txt("style_current_style"), "style_id");
             $style_sel->setOptions($st_styles);
             $style_sel->setValue($style_id);
             $form->addItem($style_sel);
             $form->addCommandButton("saveStyleSettings", $this->lng->txt("save"));
             $form->addCommandButton("createStyle", $this->lng->txt("sty_create_ind_style"));
         }
     }
     $form->setTitle($this->lng->txt("blog_style"));
     $form->setFormAction($this->ctrl->getFormAction($this));
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:41,代码来源:class.ilObjBlogGUI.php

示例3: initForm

 function initForm($a_mode)
 {
     global $ilCtrl, $lng, $ilSetting;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form_gui = new ilPropertyFormGUI();
     $form_gui->setFormAction($ilCtrl->getFormAction($this));
     $form_gui->setTitle($lng->txt("cont_ed_pglprop"));
     // title
     $title_input = new ilTextInputGUI($lng->txt("title"), "pgl_title");
     $title_input->setSize(50);
     $title_input->setMaxLength(128);
     $title_input->setValue($this->layout_object->title);
     $title_input->setTitle($lng->txt("title"));
     $title_input->setRequired(true);
     // description
     $desc_input = new ilTextAreaInputGUI($lng->txt("description"), "pgl_desc");
     $desc_input->setValue($this->layout_object->description);
     $desc_input->setRows(3);
     $desc_input->setCols(37);
     $desc_input->setTitle($lng->txt("description"));
     $desc_input->setRequired(false);
     // modules
     $mods = new ilCheckboxGroupInputGUI($this->lng->txt("modules"), "module");
     // $mods->setRequired(true);
     $mods->setValue($this->layout_object->getModules());
     foreach (ilPageLayout::getAvailableModules() as $mod_id => $mod_caption) {
         $mod = new ilCheckboxOption($mod_caption, $mod_id);
         $mods->addOption($mod);
     }
     $form_gui->addItem($title_input);
     $form_gui->addItem($desc_input);
     $form_gui->addItem($mods);
     // style
     $fixed_style = $ilSetting->get("fixed_content_style_id");
     $style_id = $this->layout_object->getStyleId();
     if ($fixed_style > 0) {
         $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
         $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" . $this->lng->txt("global_fixed") . ")");
         $form_gui->addItem($st);
     } else {
         include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
         $st_styles = ilObjStyleSheet::_getStandardStyles(true, false);
         $st_styles[0] = $this->lng->txt("default");
         ksort($st_styles);
         $style_sel = new ilSelectInputGUI($lng->txt("obj_sty"), "style_id");
         $style_sel->setOptions($st_styles);
         $style_sel->setValue($style_id);
         $form_gui->addItem($style_sel);
     }
     $form_gui->addCommandButton("updateProperties", $lng->txt($a_mode));
     return $form_gui;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:52,代码来源:class.ilPageLayoutGUI.php


注:本文中的ilObjStyleSheet::_getStandardStyles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。