ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilImportMapping Class Reference

Import mapping. More...

+ Collaboration diagram for ilImportMapping:

Public Member Functions

 __construct ()
 Constructor. More...
 
 setInstallId ($a_val)
 Set Installation ID. More...
 
 getInstallId ()
 Get Installation ID. More...
 
 setInstallUrl ($a_val)
 Set Installation Url. More...
 
 getInstallUrl ()
 Get Installation Url. More...
 
 setTargetId ($a_target_id)
 set target id More...
 
 getTargetId ()
 get target id More...
 
 addMapping ($a_comp, $a_entity, $a_old_id, $a_new_id)
 Add mapping. More...
 
 getMapping ($a_comp, $a_entity, $a_old_id)
 Get a mapping. More...
 
 getAllMappings ()
 Get mapping. More...
 
 getMappingsOfEntity ($a_comp, $a_entity)
 Get mappings for entity. More...
 

Data Fields

 $mappings
 
 $install_id
 
 $install_url
 
 $log
 

Protected Attributes

 $target_id = 0
 

Detailed Description

Import mapping.

Author
Alex Killing <alex.killing>
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilImportMapping::__construct ( )

Constructor.

Parameters

return

Definition at line 26 of file class.ilImportMapping.php.

27 {
28 $this->mappings = array();
29 $this->log = ilLoggerFactory::getLogger("exp");
30 $this->log->debug("ilImportMapping Construct this->mappings = array()");
31 }
static getLogger($a_component_id)
Get component logger.

References ilLoggerFactory\getLogger().

+ Here is the call graph for this function:

Member Function Documentation

◆ addMapping()

ilImportMapping::addMapping (   $a_comp,
  $a_entity,
  $a_old_id,
  $a_new_id 
)

Add mapping.

Parameters
stringcomponent
stringentity
stringold id
stringnew id

Definition at line 101 of file class.ilImportMapping.php.

102 {
103 $this->mappings[$a_comp][$a_entity][$a_old_id] = $a_new_id;
104 $this->log->debug("ADD MAPPING this->mappings = ", $this->mappings);
105 }

Referenced by ilIndividualAssessmentDataSet\importRecord().

+ Here is the caller graph for this function:

◆ getAllMappings()

ilImportMapping::getAllMappings ( )

Get mapping.

Returns
array mapping

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

136 {
137 return $this->mappings;
138 }

References $mappings.

◆ getInstallId()

ilImportMapping::getInstallId ( )
final

Get Installation ID.

Returns
string Installation ID

Definition at line 48 of file class.ilImportMapping.php.

References $install_id.

◆ getInstallUrl()

ilImportMapping::getInstallUrl ( )
final

Get Installation Url.

Returns
string Installation Url

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

References $install_url.

◆ getMapping()

ilImportMapping::getMapping (   $a_comp,
  $a_entity,
  $a_old_id 
)

Get a mapping.

Parameters
stringcomponent
stringentity
stringold id
Returns
string new id, or false if no mapping given

Definition at line 116 of file class.ilImportMapping.php.

117 {
118 $this->log->debug("a_comp = $a_comp, a_entity = $a_entity , a_old_id = $a_old_id");
119
120 if (!isset($this->mappings[$a_comp]) or !isset($this->mappings[$a_comp][$a_entity])) {
121 return false;
122 }
123 if (isset($this->mappings[$a_comp][$a_entity][$a_old_id])) {
124 return $this->mappings[$a_comp][$a_entity][$a_old_id];
125 }
126
127 return false;
128 }

Referenced by ilLearningSequenceImporter\buildLPSettings(), ilLearningSequenceImporter\buildLSItems(), ilTestImporter\finalRandomTestTaxonomyProcessing(), ilTestImporter\getNewMappedTaxonomyFilter(), ilIndividualAssessmentDataSet\importRecord(), and ilLearningSequenceImporter\updateRefId().

+ Here is the caller graph for this function:

◆ getMappingsOfEntity()

ilImportMapping::getMappingsOfEntity (   $a_comp,
  $a_entity 
)

Get mappings for entity.

Parameters
stringcomponent
stringentity
Returns

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

148 {
149 if (isset($this->mappings[$a_comp][$a_entity])) {
150 return $this->mappings[$a_comp][$a_entity];
151 }
152 return array();
153 }

◆ getTargetId()

ilImportMapping::getTargetId ( )
final

get target id

Returns

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

References $target_id.

◆ setInstallId()

ilImportMapping::setInstallId (   $a_val)
final

Set Installation ID.

Parameters
stringInstallation ID

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

39 {
40 $this->install_id = $a_val;
41 }

◆ setInstallUrl()

ilImportMapping::setInstallUrl (   $a_val)
final

Set Installation Url.

Parameters
stringInstallation Url

Definition at line 58 of file class.ilImportMapping.php.

59 {
60 $this->install_url = $a_val;
61 }

◆ setTargetId()

ilImportMapping::setTargetId (   $a_target_id)
final

set target id

Parameters
object$a_target_id
Returns

Definition at line 78 of file class.ilImportMapping.php.

79 {
80 $this->target_id = $a_target_id;
81 $this->log->debug("a_target_id=" . $a_target_id);
82 }

Field Documentation

◆ $install_id

ilImportMapping::$install_id

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

Referenced by getInstallId().

◆ $install_url

ilImportMapping::$install_url

Definition at line 15 of file class.ilImportMapping.php.

Referenced by getInstallUrl().

◆ $log

ilImportMapping::$log

Definition at line 16 of file class.ilImportMapping.php.

◆ $mappings

ilImportMapping::$mappings

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

Referenced by getAllMappings().

◆ $target_id

ilImportMapping::$target_id = 0
protected

Definition at line 18 of file class.ilImportMapping.php.

Referenced by getTargetId().


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