73 $this->auto_generated = $a_status;
93 $this->title = $a_val;
113 $this->type = $a_val;
133 $this->description = $a_val;
156 $settings = $this->
getConfig()->getSettings();
159 if (is_array($a_value))
160 $a_value = serialize($a_value);
162 $a_value = unserialize($a_value);
166 $this->setting[$a_setting] =
array(
179 unset($this->setting[$a_setting]);
187 $this->setting =
array();
206 $this->hidden_tab[$a_tab_id] = $a_tab_id;
214 $this->hidden_tab =
array();
256 $set = $ilDB->query(
"SELECT * FROM adm_settings_template WHERE ".
257 " id = ".$ilDB->quote($this->getId(),
"integer")
259 $rec = $ilDB->fetchAssoc($set);
268 $set = $ilDB->query(
"SELECT * FROM adm_set_templ_value WHERE ".
269 " template_id = ".$ilDB->quote($this->getId(),
"integer")
271 while ($rec = $ilDB->fetchAssoc($set))
274 $rec[
"value"], $rec[
"hide"]);
278 $set = $ilDB->query(
"SELECT * FROM adm_set_templ_hide_tab WHERE ".
279 " template_id = ".$ilDB->quote($this->getId(),
"integer")
281 while ($rec = $ilDB->fetchAssoc($set))
294 $this->
setId($ilDB->nextId(
"adm_settings_template"));
297 $ilDB->insert(
"adm_settings_template",
array(
322 $ilDB->update(
"adm_settings_template",
array(
333 $ilDB->manipulate(
"DELETE FROM adm_set_templ_value WHERE " 334 .
" template_id = ".$ilDB->quote($this->getId(),
"integer")
336 $ilDB->manipulate(
"DELETE FROM adm_set_templ_hide_tab WHERE " 337 .
" template_id = ".$ilDB->quote($this->getId(),
"integer")
355 $ilDB->manipulate(
"INSERT INTO adm_set_templ_value ".
356 "(template_id, setting, value, hide) VALUES (".
357 $ilDB->quote($this->getId(),
"integer").
",".
358 $ilDB->quote($s,
"text").
",".
359 $ilDB->quote($set[
"value"],
"text").
",".
360 $ilDB->quote($set[
"hide"],
"integer").
374 $ilDB->manipulate(
"INSERT INTO adm_set_templ_hide_tab ".
375 "(template_id, tab_id) VALUES (".
376 $ilDB->quote($this->getId(),
"integer").
",".
377 $ilDB->quote($tab_id,
"text").
389 $ilDB->manipulate(
"DELETE FROM adm_settings_template WHERE " 390 .
" id = ".$ilDB->quote($this->getId(),
"integer")
392 $ilDB->manipulate(
"DELETE FROM adm_set_templ_value WHERE " 393 .
" template_id = ".$ilDB->quote($this->getId(),
"integer")
395 $ilDB->manipulate(
"DELETE FROM adm_set_templ_hide_tab WHERE " 396 .
" template_id = ".$ilDB->quote($this->getId(),
"integer")
410 if($a_include_auto_generated)
412 $set = $ilDB->query(
"SELECT * FROM adm_settings_template ".
413 " WHERE type = ".$ilDB->quote(
$a_type,
"text").
418 $set = $ilDB->query(
"SELECT * FROM adm_settings_template ".
419 " WHERE type = ".$ilDB->quote(
$a_type,
"text").
420 'AND auto_generated = '.$ilDB->quote(0,
'integer').
' '.
426 $settings_template =
array();
427 while ($rec = $ilDB->fetchAssoc($set))
429 $settings_template[] = $rec;
431 return $settings_template;
444 $set = $ilDB->query(
"SELECT $a_prop FROM adm_settings_template WHERE ".
445 " id = ".$ilDB->quote($a_id,
"integer")
447 $rec = $ilDB->fetchAssoc($set);
448 return $rec[$a_prop];
460 return self::lookupProperty($a_id,
'title');
470 return self::lookupProperty($a_id,
'description');
476 if(substr($a_title_desc, 0, 3) ==
'il_')
478 return $GLOBALS[
'lng']->txt($a_title_desc);
480 return $a_title_desc;
setDescription($a_val)
Set description.
static getAllSettingsTemplates($a_type, $a_include_auto_generated=false)
Get all settings templates of type.
setTitle($a_val)
Set title.
getSettings()
Get settings.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
getDescription()
Get description.
setAutoGenerated($a_status)
Set auto generated status.
removeAllHiddenTabs()
Remove all hidden tabs.
setConfig(ilSettingsTemplateConfig $config)
Sets the template config for this template.
getHiddenTabs()
Get hidden tabs.
static translate($a_title_desc)
insertHiddenTabs()
Insert hidden tabs.
update()
Update settings template.
__construct($a_id=0, $config=null)
Constructor.
removeAllSettings()
Remove all settings.
static lookupTitle($a_id)
Lookup title.
addHiddenTab($a_tab_id)
Add hidden tab.
Create styles array
The data for the language used.
Settings template config class.
setSetting($a_setting, $a_value, $a_hide=false)
Set setting.
create()
Create settings template.
removeSetting($a_setting)
Remove setting.
getAutoGenerated()
Get auto generated status.
insertSettings()
Insert settings to db.
getConfig()
Returns the template config associated with this template or NULL if none is given.
Settings template application class.
static lookupProperty($a_id, $a_prop)
Lookup property.
static lookupDescription($a_id)
Lookup title.