當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ilObjStyleSheet::_getStyleSuperTypes方法代碼示例

本文整理匯總了PHP中ilObjStyleSheet::_getStyleSuperTypes方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilObjStyleSheet::_getStyleSuperTypes方法的具體用法?PHP ilObjStyleSheet::_getStyleSuperTypes怎麽用?PHP ilObjStyleSheet::_getStyleSuperTypes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ilObjStyleSheet的用法示例。


在下文中一共展示了ilObjStyleSheet::_getStyleSuperTypes方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: fillRow

 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl, $ilAccess, $rbacsystem;
     $stypes = ilObjStyleSheet::_getStyleSuperTypes();
     $types = $stypes[$this->super_type];
     if (!in_array($a_set["type"], $types)) {
         return;
     }
     //var_dump($a_set);
     // checkbox row
     /*		if ($this->expandable)
     		{
     			if (!empty($this->core_styles[$a_set["type"].".".
     				ilObjStyleSheet::_determineTag($a_set["type"]).
     				".".$a_set["class"]]))
     			{
     				$this->tpl->touchBlock("no_checkbox");
     			}
     			else
     			{*/
     $this->tpl->setCurrentBlock("checkbox");
     $this->tpl->setVariable("CHAR", $a_set["type"] . "." . ilObjStyleSheet::_determineTag($a_set["type"]) . "." . $a_set["class"]);
     $this->tpl->parseCurrentBlock();
     /*			}
     		}*/
     if ($this->hideable) {
         if (!ilObjStyleSheet::_isHideable($a_set["type"]) || !empty($this->core_styles[$a_set["type"] . "." . ilObjStyleSheet::_determineTag($a_set["type"]) . "." . $a_set["class"]])) {
             $this->tpl->touchBlock("no_hide_checkbox");
         } else {
             $this->tpl->setCurrentBlock("hide_checkbox");
             $this->tpl->setVariable("CHAR", $a_set["type"] . "." . ilObjStyleSheet::_determineTag($a_set["type"]) . "." . $a_set["class"]);
             if ($this->style->getHideStatus($a_set["type"], $a_set["class"])) {
                 $this->tpl->setVariable("CHECKED", "checked='checked'");
             }
             $this->tpl->parseCurrentBlock();
         }
     }
     // example
     $this->tpl->setVariable("EXAMPLE", ilObjStyleSheetGUI::getStyleExampleHTML($a_set["type"], $a_set["class"]));
     $tag_str = ilObjStyleSheet::_determineTag($a_set["type"]) . "." . $a_set["class"];
     $this->tpl->setVariable("TXT_TAG", $a_set["class"]);
     $this->tpl->setVariable("TXT_TYPE", $lng->txt("sty_type_" . $a_set["type"]));
     if ($rbacsystem->checkAccess("write", (int) $_GET["ref_id"])) {
         $this->tpl->setVariable("TXT_EDIT", $this->lng->txt("edit"));
         $ilCtrl->setParameter($this->parent_obj, "tag", $tag_str);
         $ilCtrl->setParameter($this->parent_obj, "style_type", $a_set["type"]);
         $this->tpl->setVariable("LINK_EDIT_TAG_STYLE", $ilCtrl->getLinkTarget($this->parent_obj, "editTagStyle"));
     }
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:53,代碼來源:class.ilStyleTableGUI.php

示例2: initCharacteristicForm

 /**
  * Init tag style editing form
  *
  * @param        int        $a_mode        Form Edit Mode (IL_FORM_EDIT | IL_FORM_CREATE)
  */
 public function initCharacteristicForm($a_mode)
 {
     global $lng, $ilCtrl;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form_gui = new ilPropertyFormGUI();
     // title
     $txt_input = new ilRegExpInputGUI($lng->txt("title"), "new_characteristic");
     $txt_input->setPattern("/^[a-zA-Z]+[a-zA-Z0-9]*\$/");
     $txt_input->setNoMatchMessage($lng->txt("sty_msg_characteristic_must_only_include") . " A-Z, a-z, 1-9");
     $txt_input->setRequired(true);
     $this->form_gui->addItem($txt_input);
     // type
     $all_super_types = ilObjStyleSheet::_getStyleSuperTypes();
     $types = $all_super_types[$this->super_type];
     $exp_types = array();
     foreach ($types as $t) {
         if (ilObjStyleSheet::_isExpandable($t)) {
             $exp_types[$t] = $lng->txt("sty_type_" . $t);
         }
     }
     if (count($exp_types) > 1) {
         $type_input = new ilSelectInputGUI($lng->txt("sty_type"), "type");
         $type_input->setOptions($exp_types);
         $type_input->setValue(key($exp_types));
         $this->form_gui->addItem($type_input);
     } else {
         if (count($exp_types) == 1) {
             $hid_input = new ilHiddenInputGUI("type");
             $hid_input->setValue(key($exp_types));
             $this->form_gui->addItem($hid_input);
         }
     }
     $this->form_gui->setTitle($lng->txt("sty_add_characteristic"));
     $this->form_gui->addCommandButton("saveCharacteristic", $lng->txt("save"));
     $this->form_gui->addCommandButton("edit", $lng->txt("cancel"));
     $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:42,代碼來源:class.ilObjStyleSheetGUI.php


注:本文中的ilObjStyleSheet::_getStyleSuperTypes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。