本文整理匯總了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;
}
示例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;
}
示例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);
}
}