ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilDidacticTemplateSettings Class Reference
+ Collaboration diagram for ilDidacticTemplateSettings:

Public Member Functions

 getTemplates ()
 Get templates.
 getObjectType ()
 Get object type.
 readInactive ()
 Read disabled templates.

Static Public Member Functions

static getInstance ()
 Get singelton instance.
static getInstanceByObjectType ($a_obj_type)
 Get instance by obj type.

Protected Member Functions

 read ()
 Read active didactic templates ilDB $ilDB.

Private Member Functions

 __construct ($a_obj_type= '')
 Constructor.

Private Attributes

 $templates = array()
 $obj_type = ''

Static Private Attributes

static $instance = null
static $instances = null

Detailed Description

Definition at line 12 of file class.ilDidacticTemplateSettings.php.

Constructor & Destructor Documentation

ilDidacticTemplateSettings::__construct (   $a_obj_type = '')
private

Constructor.

Parameters
int$a_id

Definition at line 25 of file class.ilDidacticTemplateSettings.php.

References read().

{
$this->obj_type = $a_obj_type;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

static ilDidacticTemplateSettings::getInstance ( )
static

Get singelton instance.

Returns
ilDidacticTemplateSetting

Definition at line 35 of file class.ilDidacticTemplateSettings.php.

References $instance.

Referenced by ilDidacticTemplateSettingsTableGUI\parse().

{
if(self::$instance)
{
}
return self::$instance = new ilDidacticTemplateSettings();
}

+ Here is the caller graph for this function:

static ilDidacticTemplateSettings::getInstanceByObjectType (   $a_obj_type)
static

Get instance by obj type.

Parameters
string$a_obj_type
Returns
ilDidacticTemplateSettings

Definition at line 49 of file class.ilDidacticTemplateSettings.php.

Referenced by ilDidacticTemplateGUI\appendToolbarSwitch(), and ilObjectGUI\initDidacticTemplate().

{
if(self::$instances[$a_obj_type])
{
return self::$instances[$a_obj_type];
}
return self::$instances[$a_obj_type] = new ilDidacticTemplateSettings($a_obj_type);
}

+ Here is the caller graph for this function:

ilDidacticTemplateSettings::getObjectType ( )

Get object type.

Returns
string

Definition at line 71 of file class.ilDidacticTemplateSettings.php.

References $obj_type.

Referenced by read(), and readInactive().

{
}

+ Here is the caller graph for this function:

ilDidacticTemplateSettings::getTemplates ( )

Get templates.

Returns
array ilDidacticTemplateSetting

Definition at line 62 of file class.ilDidacticTemplateSettings.php.

References $templates.

{
return (array) $this->templates;
}
ilDidacticTemplateSettings::read ( )
protected

Read active didactic templates ilDB $ilDB.

Returns
bool

Definition at line 110 of file class.ilDidacticTemplateSettings.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and getObjectType().

Referenced by __construct().

{
global $ilDB;
$query = 'SELECT dtpl.id FROM didactic_tpl_settings dtpl ';
if($this->getObjectType())
{
$query .= 'JOIN didactic_tpl_sa tplsa ON dtpl.id = tplsa.id ';
}
$query .= 'WHERE enabled = '.$ilDB->quote(1,'integer').' ';
if($this->getObjectType())
{
$query .= 'AND obj_type = '.$ilDB->quote($this->getObjectType(),'text');
}
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->templates[$row->id] = new ilDidacticTemplateSetting($row->id);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilDidacticTemplateSettings::readInactive ( )

Read disabled templates.

Definition at line 79 of file class.ilDidacticTemplateSettings.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and getObjectType().

{
global $ilDB;
$query = 'SELECT dtpl.id FROM didactic_tpl_settings dtpl ';
if($this->getObjectType())
{
$query .= 'JOIN didactic_tpl_sa tplsa ON dtpl.id = tplsa.id ';
}
$query .= 'WHERE enabled = '.$ilDB->quote(0,'integer').' ';
if($this->getObjectType())
{
$query .= 'AND obj_type = '.$ilDB->quote($this->getObjectType(),'text');
}
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->templates[$row->id] = new ilDidacticTemplateSetting($row->id);
}
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilDidacticTemplateSettings::$instance = null
staticprivate

Definition at line 14 of file class.ilDidacticTemplateSettings.php.

Referenced by getInstance().

ilDidacticTemplateSettings::$instances = null
staticprivate

Definition at line 15 of file class.ilDidacticTemplateSettings.php.

ilDidacticTemplateSettings::$obj_type = ''
private

Definition at line 19 of file class.ilDidacticTemplateSettings.php.

Referenced by getObjectType().

ilDidacticTemplateSettings::$templates = array()
private

Definition at line 18 of file class.ilDidacticTemplateSettings.php.

Referenced by getTemplates().


The documentation for this class was generated from the following file: