ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 155 of file class.ilECSNodeMappingSettings.php.

Referenced by read().

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

◆ enableAttributeMapping()

ilECSNodeMappingSettings::enableAttributeMapping (   $a_stat)

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

Referenced by read().

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

◆ enableCourseAllocation()

ilECSNodeMappingSettings::enableCourseAllocation (   $a_stat)

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

Referenced by read().

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

◆ enableDirectoryMapping()

ilECSNodeMappingSettings::enableDirectoryMapping (   $a_status)

Enable node mapping.

Parameters
bool$a_status

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

Referenced by read().

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

Referenced by read().

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

◆ getAllInOneCategory()

ilECSNodeMappingSettings::getAllInOneCategory ( )

Definition at line 165 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 203 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 145 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['DIC']['ilLog']->write(__METHOD__ . ': Deprecated call...');
54  $GLOBALS['DIC']['ilLog']->logStack();
55 
56  if (self::$instance) {
57  return self::$instance;
58  }
59  return self::$instance = new ilECSNodeMappingSettings();
60  }
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

◆ 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 ilECSCmsTreeSynchronizer\__construct(), ilECSCourseCreationHandler\__construct(), ilECSCmsCourseCommandQueueHandler\checkAllocationActivation(), ilECSCmsCourseMemberCommandQueueHandler\checkAllocationActivation(), ilECSMappingSettingsGUI\cStart(), ilECSMappingSettingsGUI\cUpdateSettings(), ilECSMappingSettingsGUI\dStart(), ilECSMappingSettingsGUI\dUpdateSettings(), ilECSNodeMappingTreeTableGUI\fillRow(), ilECSAppEventListener\handleMembership(), ilECSMappingSettingsGUI\initFormCSettings(), ilECSMappingSettingsGUI\initFormDSettings(), and ilECSMappingSettingsGUI\setSubTabs().

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

◆ getMid()

ilECSNodeMappingSettings::getMid ( )

Get mid of sender.

Returns
type

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

References $mid.

Referenced by initStorage().

+ Here is the caller graph for this function:

◆ getRoleMappings()

ilECSNodeMappingSettings::getRoleMappings ( )

Definition at line 185 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 80 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 229 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 237 of file class.ilECSNodeMappingSettings.php.

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

Referenced by __construct().

238  {
239  global $DIC;
240 
241  $ilSetting = $DIC['ilSetting'];
242 
243  $this->storage = new ilSetting('ecs_node_mapping_' . $this->getServerId() . '_' . $this->getMid());
244  }
global $DIC
Definition: saml.php:7
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 150 of file class.ilECSNodeMappingSettings.php.

References $allinone.

Referenced by update().

+ Here is the caller graph for this function:

◆ isAttributeMappingEnabled()

ilECSNodeMappingSettings::isAttributeMappingEnabled ( )

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

References $attributes.

Referenced by update().

+ Here is the caller graph for this function:

◆ isCourseAllocationEnabled()

ilECSNodeMappingSettings::isCourseAllocationEnabled ( )

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

References $course_active.

Referenced by update().

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

◆ isDirectoryMappingEnabled()

ilECSNodeMappingSettings::isDirectoryMappingEnabled ( )

Check if node mapping is enabled.

Returns
bool

Definition at line 98 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 125 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 160 of file class.ilECSNodeMappingSettings.php.

Referenced by read().

161  {
162  $this->allinone_cat = $a_cat;
163  }
+ 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 194 of file class.ilECSNodeMappingSettings.php.

Referenced by read().

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

◆ setDefaultCourseCategory()

ilECSNodeMappingSettings::setDefaultCourseCategory (   $a_def)

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

Referenced by read().

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

◆ setRoleMappings()

ilECSNodeMappingSettings::setRoleMappings (   $a_mappings)

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

Referenced by read().

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

◆ update()

ilECSNodeMappingSettings::update ( )

Save settings to db.

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

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

212  {
213  $this->getStorage()->set('directory_active', (int) $this->isDirectoryMappingEnabled());
214  $this->getStorage()->set('create_empty', $this->isEmptyContainerCreationEnabled());
215  $this->getStorage()->set('course_active', $this->isCourseAllocationEnabled());
216  $this->getStorage()->set('default_category', $this->getDefaultCourseCategory());
217  $this->getStorage()->set('allinone', $this->isAllInOneCategoryEnabled());
218  $this->getStorage()->set('allinone_cat', $this->getAllInOneCategory());
219  $this->getStorage()->set('attributes', $this->isAttributeMappingEnabled());
220  $this->getStorage()->set('role_mappings', serialize($this->getRoleMappings()));
221  $this->getStorage()->set('auth_mode', $this->getAuthMode());
222  return true;
223  }
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: