ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSNodeMappingSettings Class Reference

Genearal. More...

+ Collaboration diagram for ilECSNodeMappingSettings:

Public Member Functions

 getServerId ()
 Get server id of setting.
 getMid ()
 Get mid of sender.
 isDirectoryMappingEnabled ()
 Check if node mapping is enabled.
 enableDirectoryMapping ($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.
 enableCourseAllocation ($a_stat)
 isCourseAllocationEnabled ()
 setDefaultCourseCategory ($a_def)
 getDefaultCourseCategory ()
 isAllInOneCategoryEnabled ()
 enableAllInOne ($a_stat)
 setAllInOneCategory ($a_cat)
 getAllInOneCategory ()
 enableAttributeMapping ($a_stat)
 isAttributeMappingEnabled ()
 setRoleMappings ($a_mappings)
 getRoleMappings ()
 update ()
 Save settings to db.

Static Public Member Functions

static getInstance ()
 Get singeleton instance.
static getInstanceByServerMid ($a_server_id, $a_mid)
 Get instance.

Protected Member Functions

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

Private Attributes

 $storage = null
 $server_id = 0
 $mid = 0
 $directory_active = false
 $create_empty_containers = false
 $course_active = false
 Course allocation.
 $default_cat = 0
 $allinone = false
 $allinone_cat = 0
 $attributes = false
 $role_mappings = array()

Static Private Attributes

static $instances = array()

Detailed Description

Genearal.

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

Constructor & Destructor Documentation

ilECSNodeMappingSettings::__construct (   $a_server_id,
  $a_mid 
)
protected

Singeleton constructor.

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

References initStorage(), and read().

{
$this->server_id = $a_server_id;
$this->mid = $a_mid;
$this->initStorage();
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilECSNodeMappingSettings::enableAllInOne (   $a_stat)

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

Referenced by read().

{
$this->allinone = $a_stat;
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::enableAttributeMapping (   $a_stat)

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

Referenced by read().

{
$this->attributes = $a_stat;
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::enableCourseAllocation (   $a_stat)

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

Referenced by read().

{
$this->course_active = $a_stat;
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::enableDirectoryMapping (   $a_status)

Enable node mapping.

Parameters
bool$a_status

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

Referenced by read().

{
$this->directory_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 117 of file class.ilECSNodeMappingSettings.php.

Referenced by read().

{
$this->create_empty_containers = $a_status;
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::getAllInOneCategory ( )

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

References $allinone_cat.

Referenced by update().

{
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::getDefaultCourseCategory ( )

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

References $default_cat.

Referenced by update().

{
}

+ Here is the caller graph for this function:

static ilECSNodeMappingSettings::getInstance ( )
static

Get singeleton instance.

Returns
ilECSNodeMappingSettings

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

References $GLOBALS.

{
$GLOBALS['ilLog']->write(__METHOD__.': Deprecated call...');
$GLOBALS['ilLog']->logStack();
if(self::$instance)
{
return self::$instance;
}
return self::$instance = new ilECSNodeMappingSettings();
}
static ilECSNodeMappingSettings::getInstanceByServerMid (   $a_server_id,
  $a_mid 
)
static
ilECSNodeMappingSettings::getMid ( )

Get mid of sender.

Returns
type

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

References $mid.

Referenced by initStorage().

{
return $this->mid;
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::getRoleMappings ( )

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

References $role_mappings.

Referenced by update().

{
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::getServerId ( )

Get server id of setting.

Returns
type

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

References $server_id.

Referenced by initStorage().

{
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::getStorage ( )
protected

Get storage.

Returns
ilSetting

Definition at line 211 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 219 of file class.ilECSNodeMappingSettings.php.

References $ilSetting, getMid(), and getServerId().

Referenced by __construct().

{
global $ilSetting;
$this->storage = new ilSetting('ecs_node_mapping_'.$this->getServerId().'_'.$this->getMid());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::isAllInOneCategoryEnabled ( )

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

References $allinone.

Referenced by update().

{
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::isAttributeMappingEnabled ( )

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

References $attributes.

Referenced by update().

{
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::isCourseAllocationEnabled ( )

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

References $course_active.

Referenced by update().

{
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::isDirectoryMappingEnabled ( )

Check if node mapping is enabled.

Returns
bool

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

References $directory_active.

Referenced by update().

+ 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 126 of file class.ilECSNodeMappingSettings.php.

References $create_empty_containers.

Referenced by update().

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::read ( )
protected

Read settings from db.

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

References enableAllInOne(), enableAttributeMapping(), enableCourseAllocation(), enableDirectoryMapping(), enableEmptyContainerCreation(), getStorage(), setAllInOneCategory(), setDefaultCourseCategory(), and setRoleMappings().

Referenced by __construct().

{
$this->enableDirectoryMapping($this->getStorage()->get('directory_active', $this->directory_active));
$this->enableEmptyContainerCreation($this->getStorage()->get('create_empty'),$this->create_empty_containers);
$this->enableCourseAllocation($this->getStorage()->get('course_active'),$this->course_active);
$this->setDefaultCourseCategory($this->getStorage()->get('default_category'),$this->default_cat);
$this->enableAllInOne($this->getStorage()->get('allinone'),$this->allinone);
$this->setAllInOneCategory($this->getStorage()->get('allinone_cat'),$this->allinone_cat);
$this->enableAttributeMapping($this->getStorage()->get('attributes'),$this->attributes);
$this->setRoleMappings(unserialize($this->getStorage()->get('role_mappings')),serialize($this->role_mappings));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::setAllInOneCategory (   $a_cat)

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

Referenced by read().

{
$this->allinone_cat = $a_cat;
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::setDefaultCourseCategory (   $a_def)

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

Referenced by read().

{
$this->default_cat = $a_def;
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::setRoleMappings (   $a_mappings)

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

Referenced by read().

{
$this->role_mappings = $a_mappings;
}

+ Here is the caller graph for this function:

ilECSNodeMappingSettings::update ( )

Save settings to db.

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

References getAllInOneCategory(), getDefaultCourseCategory(), getRoleMappings(), getStorage(), isAllInOneCategoryEnabled(), isAttributeMappingEnabled(), isCourseAllocationEnabled(), isDirectoryMappingEnabled(), and isEmptyContainerCreationEnabled().

{
$this->getStorage()->set('directory_active', (int) $this->isDirectoryMappingEnabled());
$this->getStorage()->set('create_empty', $this->isEmptyContainerCreationEnabled());
$this->getStorage()->set('course_active', $this->isCourseAllocationEnabled());
$this->getStorage()->set('default_category', $this->getDefaultCourseCategory());
$this->getStorage()->set('allinone', $this->isAllInOneCategoryEnabled());
$this->getStorage()->set('allinone_cat', $this->getAllInOneCategory());
$this->getStorage()->set('attributes', $this->isAttributeMappingEnabled());
$this->getStorage()->set('role_mappings',serialize($this->getRoleMappings()));
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilECSNodeMappingSettings::$allinone = false
private

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

Referenced by isAllInOneCategoryEnabled().

ilECSNodeMappingSettings::$allinone_cat = 0
private

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

Referenced by getAllInOneCategory().

ilECSNodeMappingSettings::$attributes = false
private

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

Referenced by isAttributeMappingEnabled().

ilECSNodeMappingSettings::$course_active = false
private

Course allocation.

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

Referenced by isCourseAllocationEnabled().

ilECSNodeMappingSettings::$create_empty_containers = false
private

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

Referenced by isEmptyContainerCreationEnabled().

ilECSNodeMappingSettings::$default_cat = 0
private

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

Referenced by getDefaultCourseCategory().

ilECSNodeMappingSettings::$directory_active = false
private

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

Referenced by isDirectoryMappingEnabled().

ilECSNodeMappingSettings::$instances = array()
staticprivate

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

ilECSNodeMappingSettings::$mid = 0
private

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

Referenced by getMid().

ilECSNodeMappingSettings::$role_mappings = array()
private

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

Referenced by getRoleMappings().

ilECSNodeMappingSettings::$server_id = 0
private

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

Referenced by getServerId().

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: