本文整理匯總了PHP中ilObjStyleSheet::_getTemplateClassTypes方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilObjStyleSheet::_getTemplateClassTypes方法的具體用法?PHP ilObjStyleSheet::_getTemplateClassTypes怎麽用?PHP ilObjStyleSheet::_getTemplateClassTypes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilObjStyleSheet
的用法示例。
在下文中一共展示了ilObjStyleSheet::_getTemplateClassTypes方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getTemplateXML
/**
* Get table template xml
*/
function getTemplateXML()
{
global $ilDB;
$tag = "<StyleTemplates>";
$ttypes = array("table", "vaccordion", "haccordion");
foreach ($ttypes as $ttype) {
$ts = $this->getTemplates($ttype);
foreach ($ts as $t) {
$atts = ilObjStyleSheet::_getTemplateClassTypes($ttype);
/*$atts = array("table" => "TableClass",
"caption" => "CaptionClass",
"row_head" => "RowHeadClass",
"row_foot" => "RowFootClass",
"col_head" => "ColHeadClass",
"col_foot" => "ColFootClass",
"odd_row" => "OddRowClass",
"even_row" => "EvenRowClass",
"odd_col" => "OddColClass",
"even_col" => "EvenColClass");*/
$c = $t["classes"];
$tag .= '<StyleTemplate Name="' . $t["name"] . '">';
foreach ($atts as $type => $t) {
if ($c[$type] != "") {
$tag .= '<StyleClass Type="' . $type . '" Value="' . $c[$type] . '" />';
}
}
$tag .= "</StyleTemplate>";
}
}
$tag .= "</StyleTemplates>";
//echo htmlentities($tag);
return $tag;
}
示例2: getTemplateFormValues
/**
* Set values for table template editing
*/
function getTemplateFormValues()
{
if ($_GET["t_id"] > 0) {
$t = $this->object->getTemplate($_GET["t_id"]);
$values["name"] = $t["name"];
$scs = ilObjStyleSheet::_getTemplateClassTypes($_GET["temp_type"]);
foreach ($scs as $k => $type) {
$values[$k . "_class"] = $t["classes"][$k];
}
$this->form_gui->setValuesByArray($values);
}
}