ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilMDCreator Class Reference
+ Collaboration diagram for ilMDCreator:

Public Member Functions

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

Member Function Documentation

◆ __createGeneral() [1/2]

ilMDCreator::__createGeneral ( )

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

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

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

Referenced by create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __createGeneral() [2/2]

ilMDCreator::__createGeneral ( )

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

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 }

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

+ Here is the call graph for this function:

◆ create() [1/2]

ilMDCreator::create ( )

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

178 {
179 $this->__createGeneral();
180 }

References __createGeneral().

+ Here is the call graph for this function:

◆ create() [2/2]

ilMDCreator::create ( )

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

173 {
174 $this->__createGeneral();
175 }

References __createGeneral().

+ Here is the call graph for this function:

◆ getCatalog() [1/2]

ilMDCreator::getCatalog ( )

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

155 {
156 return $this->catalog ? $this->catalog : 'ILIAS';
157 }

Referenced by __createGeneral().

+ Here is the caller graph for this function:

◆ getCatalog() [2/2]

ilMDCreator::getCatalog ( )

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

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

◆ getDescription() [1/2]

ilMDCreator::getDescription ( )

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

85 {
86 return $this->description;
87 }

Referenced by __createGeneral().

+ Here is the caller graph for this function:

◆ getDescription() [2/2]

ilMDCreator::getDescription ( )

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

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

◆ getDescriptionLanguage() [1/2]

& ilMDCreator::getDescriptionLanguage ( )

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

103 {
104 include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
105
106 return new ilMDLanguageItem($this->title_lng);
107 }

Referenced by __createGeneral().

+ Here is the caller graph for this function:

◆ getDescriptionLanguage() [2/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 }

◆ getEntry() [1/2]

ilMDCreator::getEntry ( )

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

163 {
164 return $this->entry ? $this->entry : 'il__'.$this->getObjType().'_'.$this->getObjId();
165 }

References getObjId().

Referenced by __createGeneral().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEntry() [2/2]

ilMDCreator::getEntry ( )

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

158 {
159 return $this->entry ? $this->entry : 'il__'.$this->getObjType().'_'.$this->getObjId();
160 }

References getObjId().

+ Here is the call graph for this function:

◆ getKeyword() [1/2]

ilMDCreator::getKeyword ( )

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

123 {
124 return $this->keyword;
125 }

Referenced by __createGeneral().

+ Here is the caller graph for this function:

◆ getKeyword() [2/2]

ilMDCreator::getKeyword ( )

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

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

◆ getKeywordLanguage() [1/2]

& ilMDCreator::getKeywordLanguage ( )

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

145 {
146 include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
147
148 return new ilMDLanguageItem($this->title_lng);
149 }

Referenced by __createGeneral().

+ Here is the caller graph for this function:

◆ getKeywordLanguage() [2/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 }

◆ getLanguage() [1/2]

& ilMDCreator::getLanguage ( )

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

113 {
114 include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
115
116 return new ilMDLanguageItem($this->title_lng);
117 }

Referenced by __createGeneral().

+ Here is the caller graph for this function:

◆ getLanguage() [2/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 }

◆ getObjId() [1/2]

ilMDCreator::getObjId ( )

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

133 {
134 return $this->obj_id;
135 }

References $obj_id.

Referenced by getEntry().

+ Here is the caller graph for this function:

◆ getObjId() [2/2]

ilMDCreator::getObjId ( )

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

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

References $obj_id.

◆ getObjType() [1/2]

ilMDCreator::getObjType ( )

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

137 {
138 return $this->obj_type;
139 }

References $obj_type.

◆ getObjType() [2/2]

ilMDCreator::getObjType ( )

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

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

References $obj_type.

◆ getRBACId() [1/2]

ilMDCreator::getRBACId ( )

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

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

References $rbac_id.

◆ getRBACId() [2/2]

ilMDCreator::getRBACId ( )

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

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

References $rbac_id.

◆ getStructure() [1/2]

ilMDCreator::getStructure ( )

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

171 {
172 return $this->structure ? $this->structure : 'Hierarchical';
173 }

Referenced by __createGeneral().

+ Here is the caller graph for this function:

◆ getStructure() [2/2]

ilMDCreator::getStructure ( )

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

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

◆ getTitle() [1/2]

ilMDCreator::getTitle ( )

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

77 {
78 return $this->title;
79 }

Referenced by __createGeneral().

+ Here is the caller graph for this function:

◆ getTitle() [2/2]

ilMDCreator::getTitle ( )

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

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

◆ getTitleLanguage() [1/2]

& ilMDCreator::getTitleLanguage ( )

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

93 {
94 include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
95
96 return new ilMDLanguageItem($this->title_lng);
97 }

Referenced by __createGeneral().

+ Here is the caller graph for this function:

◆ getTitleLanguage() [2/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 }

◆ ilMDCreator() [1/2]

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

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

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

◆ ilMDCreator() [2/2]

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

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

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 }

◆ setCatalog() [1/2]

ilMDCreator::setCatalog (   $a_cat)

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

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

◆ setCatalog() [2/2]

ilMDCreator::setCatalog (   $a_cat)

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

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

◆ setDescription() [1/2]

ilMDCreator::setDescription (   $a_desc)

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

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

◆ setDescription() [2/2]

ilMDCreator::setDescription (   $a_desc)

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

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

◆ setDescriptionLanguage() [1/2]

ilMDCreator::setDescriptionLanguage (   $a_lng)

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

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

◆ setDescriptionLanguage() [2/2]

ilMDCreator::setDescriptionLanguage (   $a_lng)

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

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

◆ setEntry() [1/2]

ilMDCreator::setEntry (   $a_entry)

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

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

◆ setEntry() [2/2]

ilMDCreator::setEntry (   $a_entry)

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

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

◆ setKeyword() [1/2]

ilMDCreator::setKeyword (   $a_key)

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

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

◆ setKeyword() [2/2]

ilMDCreator::setKeyword (   $a_key)

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

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

◆ setKeywordLanguage() [1/2]

ilMDCreator::setKeywordLanguage (   $a_lng)

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

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

◆ setKeywordLanguage() [2/2]

ilMDCreator::setKeywordLanguage (   $a_lng)

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

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

◆ setLanguage() [1/2]

ilMDCreator::setLanguage (   $a_lng)

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

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

◆ setLanguage() [2/2]

ilMDCreator::setLanguage (   $a_lng)

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

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

◆ setStructure() [1/2]

ilMDCreator::setStructure (   $a_structure)

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

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

◆ setStructure() [2/2]

ilMDCreator::setStructure (   $a_structure)

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

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

◆ setTitle() [1/2]

ilMDCreator::setTitle (   $a_title)

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

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

◆ setTitle() [2/2]

ilMDCreator::setTitle (   $a_title)

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

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

◆ setTitleLanguage() [1/2]

ilMDCreator::setTitleLanguage (   $a_lng)

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

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

◆ setTitleLanguage() [2/2]

ilMDCreator::setTitleLanguage (   $a_lng)

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

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

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 files: