ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSNodeMappingSettings Class Reference

Genearal. More...

+ Collaboration diagram for ilECSNodeMappingSettings:

Public Member Functions

 isEnabled ()
 Check if node mapping is enabled.
 enable ($a_status)
 Enable node mapping.
 enableEmptyContainerCreation ($a_status)
 enable creation of empty containers
 isEmptyContainerCreationEnabled ()
 Check if the creation of empty containers (pathes without courses) is enabled.
 update ()
 Save settings to db.

Static Public Member Functions

static getInstance ()
 Get singeleton instance.

Protected Member Functions

 __construct ()
 Singeleton constructor.
 getStorage ()
 Get storage.
 initStorage ()
 Init storage.
 read ()
 Read settings from db.

Private Attributes

 $storage = null
 $active = false
 $create_empty_containers = false

Static Private Attributes

static $instance = null

Detailed Description

Genearal.

Definition at line 7 of file class.ilECSNodeMappingSettings.php.

Constructor & Destructor Documentation

ilECSNodeMappingSettings::__construct ( )
protected

Singeleton constructor.

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

References initStorage(), and read().

{
$this->initStorage();
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilECSNodeMappingSettings::enable (   $a_status)

Enable node mapping.

Parameters
bool$a_status

Definition at line 51 of file class.ilECSNodeMappingSettings.php.

Referenced by read().

{
$this->active = $a_status;
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::enableEmptyContainerCreation (   $a_status)

enable creation of empty containers

Parameters
bool$a_status

Definition at line 60 of file class.ilECSNodeMappingSettings.php.

Referenced by read().

{
$this->create_empty_containers = $a_status;
}

+ Here is the caller graph for this function:

static ilECSNodeMappingSettings::getInstance ( )
static

Get singeleton instance.

Returns
ilECSNodeMappingSettings

Definition at line 29 of file class.ilECSNodeMappingSettings.php.

References $instance.

Referenced by ilECSMappingSettingsGUI\cStart(), ilECSMappingSettingsGUI\dStart(), ilECSMappingSettingsGUI\dUpdateSettings(), and ilECSMappingSettingsGUI\initFormDSettings().

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

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::getStorage ( )
protected

Get storage.

Returns
ilSetting

Definition at line 88 of file class.ilECSNodeMappingSettings.php.

References $storage.

Referenced by read(), and update().

{
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::initStorage ( )
protected

Init storage.

Definition at line 96 of file class.ilECSNodeMappingSettings.php.

References $ilSetting.

Referenced by __construct().

{
global $ilSetting;
$this->storage = new ilSetting('ecs_node_mapping');
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::isEmptyContainerCreationEnabled ( )

Check if the creation of empty containers (pathes without courses) is enabled.

Returns
bool

Definition at line 69 of file class.ilECSNodeMappingSettings.php.

References $create_empty_containers.

Referenced by update().

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::isEnabled ( )

Check if node mapping is enabled.

Returns
bool

Definition at line 42 of file class.ilECSNodeMappingSettings.php.

References $active.

Referenced by update().

{
return $this->active;
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::read ( )
protected

Read settings from db.

Definition at line 106 of file class.ilECSNodeMappingSettings.php.

References enable(), enableEmptyContainerCreation(), and getStorage().

Referenced by __construct().

{
$this->enable($this->getStorage()->get('active', $this->active));
$this->enableEmptyContainerCreation($this->getStorage()->get('create_empty'),$this->create_empty_containers);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::update ( )

Save settings to db.

Definition at line 77 of file class.ilECSNodeMappingSettings.php.

References getStorage(), isEmptyContainerCreationEnabled(), and isEnabled().

{
$this->getStorage()->set('active', (int) $this->isEnabled());
$this->getStorage()->set('create_empty', $this->isEmptyContainerCreationEnabled());
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilECSNodeMappingSettings::$active = false
private

Definition at line 13 of file class.ilECSNodeMappingSettings.php.

Referenced by isEnabled().

ilECSNodeMappingSettings::$create_empty_containers = false
private

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

Referenced by isEmptyContainerCreationEnabled().

ilECSNodeMappingSettings::$instance = null
staticprivate

Definition at line 9 of file class.ilECSNodeMappingSettings.php.

Referenced by getInstance().

ilECSNodeMappingSettings::$storage = null
private

Definition at line 11 of file class.ilECSNodeMappingSettings.php.

Referenced by getStorage().


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