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


PHP ilObjStyleSheet::getCharacteristics方法代碼示例

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


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

示例1: ilObjStyleSheet

 /**
  * Get characteristics
  */
 static function _getCharacteristics($a_style_id)
 {
     $st_chars = ilPCParagraphGUI::_getStandardCharacteristics();
     $chars = ilPCParagraphGUI::_getStandardCharacteristics();
     if ($a_style_id > 0 && ilObject::_lookupType($a_style_id) == "sty") {
         include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
         $style = new ilObjStyleSheet($a_style_id);
         $types = array("text_block", "heading1", "heading2", "heading3");
         $chars = array();
         foreach ($types as $t) {
             $chars = array_merge($chars, $style->getCharacteristics($t));
         }
         $new_chars = array();
         foreach ($chars as $char) {
             if ($st_chars[$char] != "") {
                 $new_chars[$char] = $st_chars[$char];
             } else {
                 $new_chars[$char] = $char;
             }
             asort($new_chars);
         }
         $chars = $new_chars;
     }
     return $chars;
 }
開發者ID:khanhnnvn,項目名稱:ilias_E-learning,代碼行數:28,代碼來源:class.ilPCParagraphGUI.php

示例2: ilObjStyleSheet

 /**
  * Get characteristics
  */
 static function _getCharacteristics($a_style_id)
 {
     $chars = ilPCSectionGUI::_getStandardCharacteristics();
     if ($a_style_id > 0 && ilObject::_lookupType($a_style_id) == "sty") {
         include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
         $style = new ilObjStyleSheet($a_style_id);
         $chars = $style->getCharacteristics("section");
         $new_chars = array();
         foreach ($chars as $char) {
             if ($chars[$char] != "") {
                 $new_chars[$char] = $chars[$char];
             } else {
                 $new_chars[$char] = $char;
             }
             asort($new_chars);
         }
         $chars = $new_chars;
     }
     return $chars;
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:23,代碼來源:class.ilPCSectionGUI.php

示例3: getCharacteristicsOfCurrentStyle

 /**
  * Get characteristics of current style
  */
 protected function getCharacteristicsOfCurrentStyle($a_type)
 {
     if ($this->getStyleId() > 0 && ilObject::_lookupType($this->getStyleId()) == "sty") {
         include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
         $style = new ilObjStyleSheet($this->getStyleId());
         $chars = array();
         if (!is_array($a_type)) {
             $a_type = array($a_type);
         }
         foreach ($a_type as $at) {
             $chars = array_merge($chars, $style->getCharacteristics($at, true));
         }
         $new_chars = array();
         if (is_array($chars)) {
             foreach ($chars as $char) {
                 if ($this->chars[$char] != "") {
                     $new_chars[$char] = $this->chars[$char];
                 } else {
                     $new_chars[$char] = $char;
                 }
                 asort($new_chars);
             }
         }
         $this->setCharacteristics($new_chars);
     }
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:29,代碼來源:class.ilPageContentGUI.php


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