本文整理汇总了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);
}
}