ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMDCreator Class Reference
+ Collaboration diagram for ilMDCreator:

Public Member Functions

 __construct ($a_rbac_id, $a_obj_id, $a_type)
 
 setTitle ($a_title)
 
 getTitle ()
 
 setDescription ($a_desc)
 
 getDescription ()
 
 setTitleLanguage ($a_lng)
 
getTitleLanguage ()
 
 setDescriptionLanguage ($a_lng)
 
getDescriptionLanguage ()
 
 setLanguage ($a_lng)
 
getLanguage ()
 
 setKeyword ($a_key)
 
 getKeyword ()
 
 getRBACId ()
 
 getObjId ()
 
 getObjType ()
 
 setKeywordLanguage ($a_lng)
 
getKeywordLanguage ()
 
 setCatalog ($a_cat)
 
 getCatalog ()
 
 setEntry ($a_entry)
 
 getEntry ()
 
 setStructure ($a_structure)
 
 getStructure ()
 
 create ()
 
 __createGeneral ()
 
 __construct ($a_rbac_id, $a_obj_id, $a_type)
 
 setTitle ($a_title)
 
 getTitle ()
 
 setDescription ($a_desc)
 
 getDescription ()
 
 setTitleLanguage ($a_lng)
 
getTitleLanguage ()
 
 setDescriptionLanguage ($a_lng)
 
getDescriptionLanguage ()
 
 setLanguage ($a_lng)
 
getLanguage ()
 
 setKeyword ($a_key)
 
 getKeyword ()
 
 getRBACId ()
 
 getObjId ()
 
 getObjType ()
 
 setKeywordLanguage ($a_lng)
 
getKeywordLanguage ()
 
 setCatalog ($a_cat)
 
 getCatalog ()
 
 setEntry ($a_entry)
 
 getEntry ()
 
 setStructure ($a_structure)
 
 getStructure ()
 
 create ()
 
 __createGeneral ()
 

Data Fields

 $md_obj = null
 
 $rbac_id
 
 $obj_id
 
 $obj_type
 

Detailed Description

Definition at line 36 of file class.ilMDCreator.php.

Constructor & Destructor Documentation

◆ __construct() [1/2]

ilMDCreator::__construct (   $a_rbac_id,
  $a_obj_id,
  $a_type 
)

Definition at line 55 of file class.ilMDCreator.php.

References $a_type.

56  {
57  include_once 'Services/MetaData/classes/class.ilMD.php';
58 
59  if ($a_obj_id == 0) {
60  $a_obj_id = $a_rbac_id;
61  }
62 
63  $this->rbac_id = $a_rbac_id;
64  $this->obj_id = $a_obj_id;
65  $this->obj_type = $a_type;
66 
67  $this->md_obj = new ilMD($a_rbac_id, $a_obj_id, $a_type);
68  }
$a_type
Definition: workflow.php:92

◆ __construct() [2/2]

ilMDCreator::__construct (   $a_rbac_id,
  $a_obj_id,
  $a_type 
)

Definition at line 55 of file class.ilMDCreator.php.

References $a_type.

56  {
57  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMD.php';
58 
59  $this->rbac_id = $a_rbac_id;
60  $this->obj_id = $a_obj_id;
61  $this->obj_type = $a_type;
62 
63  $this->md_obj = new ilMD($a_rbac_id, $a_obj_id, $a_type);
64  }
$a_type
Definition: workflow.php:92

Member Function Documentation

◆ __createGeneral() [1/2]

ilMDCreator::__createGeneral ( )

Definition at line 178 of file class.ilMDCreator.php.

References getCatalog(), getDescription(), getDescriptionLanguage(), getEntry(), getKeyword(), getKeywordLanguage(), getLanguage(), getStructure(), getTitle(), and getTitleLanguage().

179  {
180  $md_gen =&$this->md_obj->addGeneral();
181 
182  $md_gen->setStructure($this->getStructure());
183  $md_gen->setTitle($this->getTitle());
184  $md_gen->setTitleLanguage($this->getTitleLanguage());
185  $md_gen->save();
186 
187  $md_ide =&$md_gen->addIdentifier();
188  $md_ide->setCatalog($this->getCatalog());
189  $md_ide->setEntry($this->getEntry());
190  $md_ide->save();
191 
192  $md_lng =&$md_gen->addLanguage();
193  $md_lng->setLanguage($this->getLanguage());
194  $md_lng->save();
195 
196  $md_des =&$md_gen->addDescription();
197  $md_des->setDescription($this->getDescription());
198  $md_des->setDescriptionLanguage($this->getDescriptionLanguage());
199  $md_des->save();
200 
201  $md_key =&$md_gen->addKeyword();
202  $md_key->setKeyword($this->getKeyword());
203  $md_key->setKeywordLanguage($this->getKeywordLanguage());
204  $md_key->save();
205 
206 
207  unset($md_gen);
208  unset($md_ide);
209  unset($md_lng);
210  unset($md_des);
211  unset($md_key);
212 
213  return true;
214  }
+ Here is the call graph for this function:

◆ __createGeneral() [2/2]

ilMDCreator::__createGeneral ( )

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

References getCatalog(), getDescription(), getDescriptionLanguage(), getEntry(), getKeyword(), getKeywordLanguage(), getLanguage(), getStructure(), getTitle(), and getTitleLanguage().

Referenced by create().

183  {
184  $md_gen =&$this->md_obj->addGeneral();
185 
186  $md_gen->setStructure($this->getStructure());
187  $md_gen->setTitle($this->getTitle());
188  $md_gen->setTitleLanguage($this->getTitleLanguage());
189  $md_gen->save();
190 
191  $md_ide =&$md_gen->addIdentifier();
192  $md_ide->setCatalog($this->getCatalog());
193  $md_ide->setEntry($this->getEntry());
194  $md_ide->save();
195 
196  $md_lng =&$md_gen->addLanguage();
197  $md_lng->setLanguage($this->getLanguage());
198  $md_lng->save();
199 
200  $md_des =&$md_gen->addDescription();
201  $md_des->setDescription($this->getDescription());
202  $md_des->setDescriptionLanguage($this->getDescriptionLanguage());
203  $md_des->save();
204 
205  $md_key =&$md_gen->addKeyword();
206  $md_key->setKeyword($this->getKeyword());
207  $md_key->setKeywordLanguage($this->getKeywordLanguage());
208  $md_key->save();
209 
210  return true;
211  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create() [1/2]

ilMDCreator::create ( )

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

References __createGeneral().

173  {
174  $this->__createGeneral();
175  }
+ Here is the call graph for this function:

◆ create() [2/2]

ilMDCreator::create ( )

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

References __createGeneral().

177  {
178  $this->__createGeneral();
179  }
+ Here is the call graph for this function:

◆ getCatalog() [1/2]

ilMDCreator::getCatalog ( )

Definition at line 149 of file class.ilMDCreator.php.

150  {
151  return $this->catalog ? $this->catalog : 'ILIAS';
152  }

◆ getCatalog() [2/2]

ilMDCreator::getCatalog ( )

Definition at line 153 of file class.ilMDCreator.php.

Referenced by __createGeneral().

154  {
155  return $this->catalog ? $this->catalog : 'ILIAS';
156  }
+ Here is the caller graph for this function:

◆ getDescription() [1/2]

ilMDCreator::getDescription ( )

Definition at line 79 of file class.ilMDCreator.php.

References $description.

80  {
81  return $this->description;
82  }

◆ getDescription() [2/2]

ilMDCreator::getDescription ( )

Definition at line 83 of file class.ilMDCreator.php.

References $description.

Referenced by __createGeneral().

84  {
85  return $this->description;
86  }
+ Here is the caller graph for this function:

◆ getDescriptionLanguage() [1/2]

& ilMDCreator::getDescriptionLanguage ( )

Definition at line 97 of file class.ilMDCreator.php.

98  {
99  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
100 
101  return new ilMDLanguageItem($this->title_lng);
102  }

◆ getDescriptionLanguage() [2/2]

& ilMDCreator::getDescriptionLanguage ( )

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

Referenced by __createGeneral().

102  {
103  include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
104 
105  return new ilMDLanguageItem($this->title_lng);
106  }
+ Here is the caller graph for this function:

◆ getEntry() [1/2]

ilMDCreator::getEntry ( )

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

References getObjId(), and getObjType().

158  {
159  return $this->entry ? $this->entry : 'il__' . $this->getObjType() . '_' . $this->getObjId();
160  }
+ Here is the call graph for this function:

◆ getEntry() [2/2]

ilMDCreator::getEntry ( )

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

References getObjId(), and getObjType().

Referenced by __createGeneral().

162  {
163  return $this->entry ? $this->entry : 'il__' . $this->getObjType() . '_' . $this->getObjId();
164  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getKeyword() [1/2]

ilMDCreator::getKeyword ( )

Definition at line 117 of file class.ilMDCreator.php.

118  {
119  return $this->keyword;
120  }

◆ getKeyword() [2/2]

ilMDCreator::getKeyword ( )

Definition at line 121 of file class.ilMDCreator.php.

Referenced by __createGeneral().

122  {
123  return $this->keyword;
124  }
+ Here is the caller graph for this function:

◆ getKeywordLanguage() [1/2]

& ilMDCreator::getKeywordLanguage ( )

Definition at line 139 of file class.ilMDCreator.php.

140  {
141  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
142 
143  return new ilMDLanguageItem($this->title_lng);
144  }

◆ getKeywordLanguage() [2/2]

& ilMDCreator::getKeywordLanguage ( )

Definition at line 143 of file class.ilMDCreator.php.

Referenced by __createGeneral().

144  {
145  include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
146 
147  return new ilMDLanguageItem($this->title_lng);
148  }
+ Here is the caller graph for this function:

◆ getLanguage() [1/2]

& ilMDCreator::getLanguage ( )

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

108  {
109  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
110 
111  return new ilMDLanguageItem($this->title_lng);
112  }

◆ getLanguage() [2/2]

& ilMDCreator::getLanguage ( )

Definition at line 111 of file class.ilMDCreator.php.

Referenced by __createGeneral().

112  {
113  include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
114 
115  return new ilMDLanguageItem($this->title_lng);
116  }
+ Here is the caller graph for this function:

◆ getObjId() [1/2]

ilMDCreator::getObjId ( )

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

References $obj_id.

128  {
129  return $this->obj_id;
130  }

◆ getObjId() [2/2]

ilMDCreator::getObjId ( )

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

References $obj_id.

Referenced by getEntry().

132  {
133  return $this->obj_id;
134  }
+ Here is the caller graph for this function:

◆ getObjType() [1/2]

ilMDCreator::getObjType ( )

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

References $obj_type.

132  {
133  return $this->obj_type;
134  }

◆ getObjType() [2/2]

ilMDCreator::getObjType ( )

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

References $obj_type.

Referenced by getEntry().

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

◆ getRBACId() [1/2]

ilMDCreator::getRBACId ( )

Definition at line 123 of file class.ilMDCreator.php.

References $rbac_id.

124  {
125  return $this->rbac_id;
126  }

◆ getRBACId() [2/2]

ilMDCreator::getRBACId ( )

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

References $rbac_id.

128  {
129  return $this->rbac_id;
130  }

◆ getStructure() [1/2]

ilMDCreator::getStructure ( )

Definition at line 165 of file class.ilMDCreator.php.

166  {
167  return $this->structure ? $this->structure : 'Hierarchical';
168  }

◆ getStructure() [2/2]

ilMDCreator::getStructure ( )

Definition at line 169 of file class.ilMDCreator.php.

Referenced by __createGeneral().

170  {
171  return $this->structure ? $this->structure : 'Hierarchical';
172  }
+ Here is the caller graph for this function:

◆ getTitle() [1/2]

ilMDCreator::getTitle ( )

Definition at line 71 of file class.ilMDCreator.php.

References $title.

72  {
73  return $this->title;
74  }

◆ getTitle() [2/2]

ilMDCreator::getTitle ( )

Definition at line 75 of file class.ilMDCreator.php.

References $title.

Referenced by __createGeneral().

76  {
77  return $this->title;
78  }
+ Here is the caller graph for this function:

◆ getTitleLanguage() [1/2]

& ilMDCreator::getTitleLanguage ( )

Definition at line 87 of file class.ilMDCreator.php.

88  {
89  include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDLanguageItem.php';
90 
91  return new ilMDLanguageItem($this->title_lng);
92  }

◆ getTitleLanguage() [2/2]

& ilMDCreator::getTitleLanguage ( )

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

Referenced by __createGeneral().

92  {
93  include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
94 
95  return new ilMDLanguageItem($this->title_lng);
96  }
+ Here is the caller graph for this function:

◆ setCatalog() [1/2]

ilMDCreator::setCatalog (   $a_cat)

Definition at line 145 of file class.ilMDCreator.php.

146  {
147  $this->catalog = $a_cat;
148  }

◆ setCatalog() [2/2]

ilMDCreator::setCatalog (   $a_cat)

Definition at line 149 of file class.ilMDCreator.php.

150  {
151  $this->catalog = $a_cat;
152  }

◆ setDescription() [1/2]

ilMDCreator::setDescription (   $a_desc)

Definition at line 75 of file class.ilMDCreator.php.

76  {
77  $this->description = $a_desc;
78  }

◆ setDescription() [2/2]

ilMDCreator::setDescription (   $a_desc)

Definition at line 79 of file class.ilMDCreator.php.

80  {
81  $this->description = $a_desc;
82  }

◆ setDescriptionLanguage() [1/2]

ilMDCreator::setDescriptionLanguage (   $a_lng)

Definition at line 93 of file class.ilMDCreator.php.

94  {
95  $this->title_lng = $a_lng;
96  }

◆ setDescriptionLanguage() [2/2]

ilMDCreator::setDescriptionLanguage (   $a_lng)

Definition at line 97 of file class.ilMDCreator.php.

98  {
99  $this->title_lng = $a_lng;
100  }

◆ setEntry() [1/2]

ilMDCreator::setEntry (   $a_entry)

Definition at line 153 of file class.ilMDCreator.php.

154  {
155  $this->entry = $a_entry;
156  }

◆ setEntry() [2/2]

ilMDCreator::setEntry (   $a_entry)

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

158  {
159  $this->entry = $a_entry;
160  }

◆ setKeyword() [1/2]

ilMDCreator::setKeyword (   $a_key)

Definition at line 113 of file class.ilMDCreator.php.

114  {
115  $this->keyword = $a_key;
116  }

◆ setKeyword() [2/2]

ilMDCreator::setKeyword (   $a_key)

Definition at line 117 of file class.ilMDCreator.php.

118  {
119  $this->keyword = $a_key;
120  }

◆ setKeywordLanguage() [1/2]

ilMDCreator::setKeywordLanguage (   $a_lng)

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

136  {
137  $this->title_lng = $a_lng;
138  }

◆ setKeywordLanguage() [2/2]

ilMDCreator::setKeywordLanguage (   $a_lng)

Definition at line 139 of file class.ilMDCreator.php.

140  {
141  $this->title_lng = $a_lng;
142  }

◆ setLanguage() [1/2]

ilMDCreator::setLanguage (   $a_lng)

Definition at line 103 of file class.ilMDCreator.php.

104  {
105  $this->title_lng = $a_lng;
106  }

◆ setLanguage() [2/2]

ilMDCreator::setLanguage (   $a_lng)

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

108  {
109  $this->title_lng = $a_lng;
110  }

◆ setStructure() [1/2]

ilMDCreator::setStructure (   $a_structure)

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

162  {
163  $this->structure = $a_structure;
164  }

◆ setStructure() [2/2]

ilMDCreator::setStructure (   $a_structure)

Definition at line 165 of file class.ilMDCreator.php.

166  {
167  $this->structure = $a_structure;
168  }

◆ setTitle() [1/2]

ilMDCreator::setTitle (   $a_title)

Definition at line 67 of file class.ilMDCreator.php.

68  {
69  $this->title = $a_title;
70  }

◆ setTitle() [2/2]

ilMDCreator::setTitle (   $a_title)

Definition at line 71 of file class.ilMDCreator.php.

72  {
73  $this->title = $a_title;
74  }

◆ setTitleLanguage() [1/2]

ilMDCreator::setTitleLanguage (   $a_lng)

Definition at line 83 of file class.ilMDCreator.php.

84  {
85  $this->title_lng = $a_lng;
86  }

◆ setTitleLanguage() [2/2]

ilMDCreator::setTitleLanguage (   $a_lng)

Definition at line 87 of file class.ilMDCreator.php.

88  {
89  $this->title_lng = $a_lng;
90  }

Field Documentation

◆ $md_obj

ilMDCreator::$md_obj = null

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

◆ $obj_id

ilMDCreator::$obj_id

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

Referenced by getObjId().

◆ $obj_type

ilMDCreator::$obj_type

Definition at line 53 of file class.ilMDCreator.php.

Referenced by getObjType().

◆ $rbac_id

ilMDCreator::$rbac_id

Definition at line 43 of file class.ilMDCreator.php.

Referenced by getRBACId().


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