ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
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 ()
 
 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()
 

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

References initStorage(), and read().

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

Member Function Documentation

◆ enableAllInOne()

ilECSNodeMappingSettings::enableAllInOne (   $a_stat)

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

Referenced by read().

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

◆ enableAttributeMapping()

ilECSNodeMappingSettings::enableAttributeMapping (   $a_stat)

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

Referenced by read().

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

◆ enableCourseAllocation()

ilECSNodeMappingSettings::enableCourseAllocation (   $a_stat)

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

Referenced by read().

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

◆ enableDirectoryMapping()

ilECSNodeMappingSettings::enableDirectoryMapping (   $a_status)

Enable node mapping.

Parameters
bool$a_status

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

Referenced by read().

109  {
110  $this->directory_active = $a_status;
111  }
+ 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 117 of file class.ilECSNodeMappingSettings.php.

Referenced by read().

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

◆ getAllInOneCategory()

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:

◆ getDefaultCourseCategory()

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:

◆ getInstance()

static ilECSNodeMappingSettings::getInstance ( )
static

Get singeleton instance.

Returns
ilECSNodeMappingSettings

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

References $GLOBALS.

51  {
52  $GLOBALS['ilLog']->write(__METHOD__.': Deprecated call...');
53  $GLOBALS['ilLog']->logStack();
54 
55  if(self::$instance)
56  {
57  return self::$instance;
58  }
59  return self::$instance = new ilECSNodeMappingSettings();
60  }
$GLOBALS['ct_recipient']

◆ getInstanceByServerMid()

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

Get instance.

Parameters
type$a_server_id
type$a_mid
Returns
ilECSNodeMappingSettings

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

Referenced by ilECSCourseCreationHandler\__construct(), ilECSCmsTreeSynchronizer\__construct(), ilECSCmsCourseCommandQueueHandler\checkAllocationActivation(), ilECSCmsCourseMemberCommandQueueHandler\checkAllocationActivation(), ilECSMappingSettingsGUI\cStart(), ilECSMappingSettingsGUI\cUpdateSettings(), ilECSMappingSettingsGUI\dStart(), ilECSMappingSettingsGUI\dUpdateSettings(), ilECSNodeMappingTreeTableGUI\fillRow(), ilECSMappingSettingsGUI\initFormCSettings(), ilECSMappingSettingsGUI\initFormDSettings(), and ilECSMappingSettingsGUI\setSubTabs().

69  {
70  if(self::$instances[$a_server_id.'_'.$a_mid])
71  {
72  return self::$instances[$a_server_id.'_'.$a_mid];
73  }
74  return self::$instances[$a_server_id.'_'.$a_mid] = new self($a_server_id,$a_mid);
75  }
+ Here is the caller graph for this function:

◆ getMid()

ilECSNodeMappingSettings::getMid ( )

Get mid of sender.

Returns
type

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

References $mid.

Referenced by initStorage().

+ Here is the caller graph for this function:

◆ getRoleMappings()

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:

◆ getServerId()

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:

◆ getStorage()

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:

◆ initStorage()

ilECSNodeMappingSettings::initStorage ( )
protected

Init storage.

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

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

Referenced by __construct().

220  {
221  global $ilSetting;
222 
223  $this->storage = new ilSetting('ecs_node_mapping_'.$this->getServerId().'_'.$this->getMid());
224  }
ILIAS Setting Class.
getServerId()
Get server id of setting.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAllInOneCategoryEnabled()

ilECSNodeMappingSettings::isAllInOneCategoryEnabled ( )

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

References $allinone.

Referenced by update().

+ Here is the caller graph for this function:

◆ isAttributeMappingEnabled()

ilECSNodeMappingSettings::isAttributeMappingEnabled ( )

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

References $attributes.

Referenced by update().

+ Here is the caller graph for this function:

◆ isCourseAllocationEnabled()

ilECSNodeMappingSettings::isCourseAllocationEnabled ( )

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

References $course_active.

Referenced by update().

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

◆ isDirectoryMappingEnabled()

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:

◆ isEmptyContainerCreationEnabled()

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:

◆ read()

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().

230  {
231  $this->enableDirectoryMapping($this->getStorage()->get('directory_active', $this->directory_active));
232  $this->enableEmptyContainerCreation($this->getStorage()->get('create_empty'),$this->create_empty_containers);
233  $this->enableCourseAllocation($this->getStorage()->get('course_active'),$this->course_active);
234  $this->setDefaultCourseCategory($this->getStorage()->get('default_category'),$this->default_cat);
235  $this->enableAllInOne($this->getStorage()->get('allinone'),$this->allinone);
236  $this->setAllInOneCategory($this->getStorage()->get('allinone_cat'),$this->allinone_cat);
237  $this->enableAttributeMapping($this->getStorage()->get('attributes'),$this->attributes);
238  $this->setRoleMappings(unserialize($this->getStorage()->get('role_mappings')),serialize($this->role_mappings));
239  }
enableDirectoryMapping($a_status)
Enable node mapping.
enableEmptyContainerCreation($a_status)
enable creation of empty containers
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAllInOneCategory()

ilECSNodeMappingSettings::setAllInOneCategory (   $a_cat)

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

Referenced by read().

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

◆ setDefaultCourseCategory()

ilECSNodeMappingSettings::setDefaultCourseCategory (   $a_def)

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

Referenced by read().

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

◆ setRoleMappings()

ilECSNodeMappingSettings::setRoleMappings (   $a_mappings)

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

Referenced by read().

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

◆ update()

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().

195  {
196  $this->getStorage()->set('directory_active', (int) $this->isDirectoryMappingEnabled());
197  $this->getStorage()->set('create_empty', $this->isEmptyContainerCreationEnabled());
198  $this->getStorage()->set('course_active', $this->isCourseAllocationEnabled());
199  $this->getStorage()->set('default_category', $this->getDefaultCourseCategory());
200  $this->getStorage()->set('allinone', $this->isAllInOneCategoryEnabled());
201  $this->getStorage()->set('allinone_cat', $this->getAllInOneCategory());
202  $this->getStorage()->set('attributes', $this->isAttributeMappingEnabled());
203  $this->getStorage()->set('role_mappings',serialize($this->getRoleMappings()));
204  return true;
205  }
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().

◆ $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: