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


PHP ilObjStyleSheet::_isExpandable方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  */
 function __construct($a_parent_obj, $a_parent_cmd, $a_chars, $a_super_type, $a_style)
 {
     global $ilCtrl, $lng, $ilAccess, $lng, $rbacsystem;
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->media_object = $a_media_object;
     $this->super_type = $a_super_type;
     $this->style = $a_style;
     $all_super_types = ilObjStyleSheet::_getStyleSuperTypes();
     $this->types = $all_super_types[$this->super_type];
     $this->core_styles = ilObjStyleSheet::_getCoreStyles();
     $this->setData($a_chars);
     $this->setTitle($lng->txt("sty_" . $a_super_type . "_char"));
     $this->setLimit(9999);
     // check, whether any of the types is expandable
     $this->expandable = false;
     $this->hideable = false;
     foreach ($this->types as $t) {
         if (ilObjStyleSheet::_isExpandable($t)) {
             $this->expandable = true;
         }
         if (ilObjStyleSheet::_isHideable($t)) {
             $this->hideable = true;
         }
     }
     //		if ($this->expandable)
     //		{
     $this->addColumn("", "", "1");
     // checkbox
     //		}
     $this->addColumn($this->lng->txt("sty_name"), "", "1");
     $this->addColumn($this->lng->txt("sty_type"), "", "");
     $this->addColumn($this->lng->txt("sty_example"), "", "");
     if ($this->hideable) {
         $this->addColumn($this->lng->txt("sty_hide"), "", "");
         // hide checkbox
     }
     $this->addColumn($this->lng->txt("sty_commands"), "", "1");
     $this->setEnableHeader(true);
     $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
     $this->setRowTemplate("tpl.style_row.html", "Services/Style");
     $this->disable("footer");
     if ($rbacsystem->checkAccess("write", (int) $_GET["ref_id"])) {
         // action commands
         if ($this->hideable) {
             $this->addCommandButton("saveHideStatus", $lng->txt("sty_save_hide_status"));
         }
         $this->addMultiCommand("copyCharacteristics", $lng->txt("copy"));
         // action commands
         if ($this->expandable) {
             $this->addMultiCommand("deleteCharacteristicConfirmation", $lng->txt("delete"));
             //$this->addCommandButton("addCharacteristicForm", $lng->txt("sty_add_characteristic"));
         }
     }
     $this->setEnableTitle(true);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:58,代码来源: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::_isExpandable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。