當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。