ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilECSNodeMappingSettings Class Reference

Genearal. More...

+ Collaboration diagram for ilECSNodeMappingSettings:

Public Member Functions

 getServerId ()
 Get server id of setting. More...
 
 getMid ()
 Get mid of sender. More...
 
 isDirectoryMappingEnabled ()
 Check if node mapping is enabled. More...
 
 enableDirectoryMapping ($a_status)
 Enable node mapping. More...
 
 enableEmptyContainerCreation ($a_status)
 enable creation of empty containers More...
 
 isEmptyContainerCreationEnabled ()
 Check if the creation of empty containers (pathes without courses) is enabled. More...
 
 enableCourseAllocation ($a_stat)
 
 isCourseAllocationEnabled ()
 
 setDefaultCourseCategory ($a_def)
 
 getDefaultCourseCategory ()
 
 isAllInOneCategoryEnabled ()
 
 enableAllInOne ($a_stat)
 
 setAllInOneCategory ($a_cat)
 
 getAllInOneCategory ()
 
 enableAttributeMapping ($a_stat)
 
 isAttributeMappingEnabled ()
 
 setRoleMappings ($a_mappings)
 
 getRoleMappings ()
 
 setAuthMode ($a_auth_mode)
 Set user auth mode. More...
 
 getAuthMode ()
 Get auth mode. More...
 
 update ()
 Save settings to db. More...
 

Static Public Member Functions

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

Protected Member Functions

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

Private Attributes

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

Static Private Attributes

static $instances = array()
 

Detailed Description

Genearal.

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

Constructor & Destructor Documentation

◆ __construct()

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

Singeleton constructor.

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

References initStorage(), and read().

39  {
40  $this->server_id = $a_server_id;
41  $this->mid = $a_mid;
42 
43  $this->initStorage();
44  $this->read();
45  }
+ Here is the call graph for this function:

Member Function Documentation

◆ enableAllInOne()

ilECSNodeMappingSettings::enableAllInOne (   $a_stat)

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

Referenced by read().

158  {
159  $this->allinone = $a_stat;
160  }
+ Here is the caller graph for this function:

◆ enableAttributeMapping()

ilECSNodeMappingSettings::enableAttributeMapping (   $a_stat)

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

Referenced by read().

173  {
174  $this->attributes = $a_stat;
175  }
+ Here is the caller graph for this function:

◆ enableCourseAllocation()

ilECSNodeMappingSettings::enableCourseAllocation (   $a_stat)

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

Referenced by read().

133  {
134  $this->course_active = $a_stat;
135  }
+ Here is the caller graph for this function:

◆ enableDirectoryMapping()

ilECSNodeMappingSettings::enableDirectoryMapping (   $a_status)

Enable node mapping.

Parameters
bool$a_status

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

Referenced by read().

110  {
111  $this->directory_active = $a_status;
112  }
+ Here is the caller graph for this function:

◆ enableEmptyContainerCreation()

ilECSNodeMappingSettings::enableEmptyContainerCreation (   $a_status)

enable creation of empty containers

Parameters
bool$a_status

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

Referenced by read().

119  {
120  $this->create_empty_containers = $a_status;
121  }
+ Here is the caller graph for this function:

◆ getAllInOneCategory()

ilECSNodeMappingSettings::getAllInOneCategory ( )

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

References $allinone_cat.

Referenced by update().

+ Here is the caller graph for this function:

◆ getAuthMode()

ilECSNodeMappingSettings::getAuthMode ( )

Get auth mode.

Returns
type

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

References $auth_mode.

Referenced by update().

+ Here is the caller graph for this function:

◆ getDefaultCourseCategory()

ilECSNodeMappingSettings::getDefaultCourseCategory ( )

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

References $default_cat.

Referenced by update().

+ Here is the caller graph for this function:

◆ getInstance()

static ilECSNodeMappingSettings::getInstance ( )
static

Get singeleton instance.

Returns
ilECSNodeMappingSettings

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

References $GLOBALS.

52  {
53  $GLOBALS['ilLog']->write(__METHOD__.': Deprecated call...');
54  $GLOBALS['ilLog']->logStack();
55 
56  if(self::$instance)
57  {
58  return self::$instance;
59  }
60  return self::$instance = new ilECSNodeMappingSettings();
61  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

◆ getInstanceByServerMid()

static ilECSNodeMappingSettings::getInstanceByServerMid (   $a_server_id,
  $a_mid 
)
static

◆ getMid()

ilECSNodeMappingSettings::getMid ( )

Get mid of sender.

Returns
type

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

References $mid.

Referenced by initStorage().

+ Here is the caller graph for this function:

◆ getRoleMappings()

ilECSNodeMappingSettings::getRoleMappings ( )

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

References $role_mappings.

Referenced by update().

+ Here is the caller graph for this function:

◆ getServerId()

ilECSNodeMappingSettings::getServerId ( )

Get server id of setting.

Returns
type

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

References $server_id.

Referenced by initStorage().

+ Here is the caller graph for this function:

◆ getStorage()

ilECSNodeMappingSettings::getStorage ( )
protected

Get storage.

Returns
ilSetting

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

References $storage.

Referenced by read(), and update().

+ Here is the caller graph for this function:

◆ initStorage()

ilECSNodeMappingSettings::initStorage ( )
protected

Init storage.

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

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

Referenced by __construct().

240  {
241  global $ilSetting;
242 
243  $this->storage = new ilSetting('ecs_node_mapping_'.$this->getServerId().'_'.$this->getMid());
244  }
ILIAS Setting Class.
getServerId()
Get server id of setting.
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAllInOneCategoryEnabled()

ilECSNodeMappingSettings::isAllInOneCategoryEnabled ( )

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

References $allinone.

Referenced by update().

+ Here is the caller graph for this function:

◆ isAttributeMappingEnabled()

ilECSNodeMappingSettings::isAttributeMappingEnabled ( )

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

References $attributes.

Referenced by update().

+ Here is the caller graph for this function:

◆ isCourseAllocationEnabled()

ilECSNodeMappingSettings::isCourseAllocationEnabled ( )

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

References $course_active.

Referenced by update().

138  {
139  return $this->course_active;
140  }
+ Here is the caller graph for this function:

◆ isDirectoryMappingEnabled()

ilECSNodeMappingSettings::isDirectoryMappingEnabled ( )

Check if node mapping is enabled.

Returns
bool

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

References $directory_active.

Referenced by update().

+ Here is the caller graph for this function:

◆ isEmptyContainerCreationEnabled()

ilECSNodeMappingSettings::isEmptyContainerCreationEnabled ( )

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

Returns
bool

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

References $create_empty_containers.

Referenced by update().

+ Here is the caller graph for this function:

◆ read()

ilECSNodeMappingSettings::read ( )
protected

Read settings from db.

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

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

Referenced by __construct().

250  {
251  $this->enableDirectoryMapping($this->getStorage()->get('directory_active', $this->directory_active));
252  $this->enableEmptyContainerCreation($this->getStorage()->get('create_empty'),$this->create_empty_containers);
253  $this->enableCourseAllocation($this->getStorage()->get('course_active'),$this->course_active);
254  $this->setDefaultCourseCategory($this->getStorage()->get('default_category'),$this->default_cat);
255  $this->enableAllInOne($this->getStorage()->get('allinone'),$this->allinone);
256  $this->setAllInOneCategory($this->getStorage()->get('allinone_cat'),$this->allinone_cat);
257  $this->enableAttributeMapping($this->getStorage()->get('attributes'),$this->attributes);
258  $this->setRoleMappings(unserialize($this->getStorage()->get('role_mappings')),serialize($this->role_mappings));
259  $this->setAuthMode($this->getStorage()->get('auth_mode', $this->auth_mode));
260  }
enableDirectoryMapping($a_status)
Enable node mapping.
enableEmptyContainerCreation($a_status)
enable creation of empty containers
setAuthMode($a_auth_mode)
Set user auth mode.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAllInOneCategory()

ilECSNodeMappingSettings::setAllInOneCategory (   $a_cat)

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

Referenced by read().

163  {
164  $this->allinone_cat = $a_cat;
165  }
+ Here is the caller graph for this function:

◆ setAuthMode()

ilECSNodeMappingSettings::setAuthMode (   $a_auth_mode)

Set user auth mode.

Parameters
type$a_auth_mode

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

Referenced by read().

197  {
198  $this->auth_mode = $a_auth_mode;
199  }
+ Here is the caller graph for this function:

◆ setDefaultCourseCategory()

ilECSNodeMappingSettings::setDefaultCourseCategory (   $a_def)

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

Referenced by read().

143  {
144  $this->default_cat = $a_def;
145  }
+ Here is the caller graph for this function:

◆ setRoleMappings()

ilECSNodeMappingSettings::setRoleMappings (   $a_mappings)

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

Referenced by read().

183  {
184  $this->role_mappings = $a_mappings;
185  }
+ Here is the caller graph for this function:

◆ update()

ilECSNodeMappingSettings::update ( )

Save settings to db.

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

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

214  {
215  $this->getStorage()->set('directory_active', (int) $this->isDirectoryMappingEnabled());
216  $this->getStorage()->set('create_empty', $this->isEmptyContainerCreationEnabled());
217  $this->getStorage()->set('course_active', $this->isCourseAllocationEnabled());
218  $this->getStorage()->set('default_category', $this->getDefaultCourseCategory());
219  $this->getStorage()->set('allinone', $this->isAllInOneCategoryEnabled());
220  $this->getStorage()->set('allinone_cat', $this->getAllInOneCategory());
221  $this->getStorage()->set('attributes', $this->isAttributeMappingEnabled());
222  $this->getStorage()->set('role_mappings',serialize($this->getRoleMappings()));
223  $this->getStorage()->set('auth_mode', $this->getAuthMode());
224  return true;
225  }
isDirectoryMappingEnabled()
Check if node mapping is enabled.
isEmptyContainerCreationEnabled()
Check if the creation of empty containers (pathes without courses) is enabled.
+ Here is the call graph for this function:

Field Documentation

◆ $allinone

ilECSNodeMappingSettings::$allinone = false
private

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

Referenced by isAllInOneCategoryEnabled().

◆ $allinone_cat

ilECSNodeMappingSettings::$allinone_cat = 0
private

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

Referenced by getAllInOneCategory().

◆ $attributes

ilECSNodeMappingSettings::$attributes = false
private

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

Referenced by isAttributeMappingEnabled().

◆ $auth_mode

ilECSNodeMappingSettings::$auth_mode = null
private

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

Referenced by getAuthMode().

◆ $course_active

ilECSNodeMappingSettings::$course_active = false
private

Course allocation.

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

Referenced by isCourseAllocationEnabled().

◆ $create_empty_containers

ilECSNodeMappingSettings::$create_empty_containers = false
private

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

Referenced by isEmptyContainerCreationEnabled().

◆ $default_cat

ilECSNodeMappingSettings::$default_cat = 0
private

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

Referenced by getDefaultCourseCategory().

◆ $directory_active

ilECSNodeMappingSettings::$directory_active = false
private

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

Referenced by isDirectoryMappingEnabled().

◆ $instances

ilECSNodeMappingSettings::$instances = array()
staticprivate

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

◆ $mid

ilECSNodeMappingSettings::$mid = 0
private

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

Referenced by getMid().

◆ $role_mappings

ilECSNodeMappingSettings::$role_mappings = array()
private

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

Referenced by getRoleMappings().

◆ $server_id

ilECSNodeMappingSettings::$server_id = 0
private

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

Referenced by getServerId().

◆ $storage

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: