ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMDCreator Class Reference
+ Collaboration diagram for ilMDCreator:

Public Member Functions

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

Data Fields

string $obj_type
 

Protected Attributes

ilMD $md_obj
 

Private Attributes

int $rbac_id
 
int $obj_id
 
string $structure = ''
 
string $catalog = ''
 
string $entry = ''
 
string $keyword = ''
 
string $title = ''
 
string $description = ''
 
string $title_lng = ''
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

63  {
64  if ($a_obj_id === 0) {
65  $a_obj_id = $a_rbac_id;
66  }
67 
68  $this->rbac_id = $a_rbac_id;
69  $this->obj_id = $a_obj_id;
70  $this->obj_type = $a_type;
71 
72  $this->md_obj = new ilMD($a_rbac_id, $a_obj_id, $a_type);
73  }

Member Function Documentation

◆ __createGeneral()

ilMDCreator::__createGeneral ( )

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

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

Referenced by create().

197  : bool
198  {
199  $md_gen = $this->md_obj->addGeneral();
200 
201  $md_gen->setStructure($this->getStructure());
202  $md_gen->setTitle($this->getTitle());
203  $md_gen->setTitleLanguage($this->getTitleLanguage());
204  $md_gen->save();
205 
206  $md_ide = $md_gen->addIdentifier();
207  $md_ide->setCatalog($this->getCatalog());
208  $md_ide->setEntry($this->getEntry());
209  $md_ide->save();
210 
211  $md_lng = $md_gen->addLanguage();
212  $md_lng->setLanguage($this->getLanguage());
213  $md_lng->save();
214 
215  $md_des = $md_gen->addDescription();
216  $md_des->setDescription($this->getDescription());
217  $md_des->setDescriptionLanguage($this->getDescriptionLanguage());
218  $md_des->save();
219 
220  $md_key = $md_gen->addKeyword();
221  $md_key->setKeyword($this->getKeyword());
222  $md_key->setKeywordLanguage($this->getKeywordLanguage());
223  $md_key->save();
224 
225  return true;
226  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

ilMDCreator::create ( )

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

References __createGeneral().

191  : void
192  {
193  $this->__createGeneral();
194  }
+ Here is the call graph for this function:

◆ getCatalog()

ilMDCreator::getCatalog ( )

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

Referenced by __createGeneral().

166  : string
167  {
168  return $this->catalog ?: 'ILIAS';
169  }
+ Here is the caller graph for this function:

◆ getDescription()

ilMDCreator::getDescription ( )

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

References $description.

Referenced by __createGeneral().

91  : string
92  {
93  return $this->description;
94  }
+ Here is the caller graph for this function:

◆ getDescriptionLanguage()

ilMDCreator::getDescriptionLanguage ( )

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

Referenced by __createGeneral().

112  {
113  return new ilMDLanguageItem($this->title_lng);
114  }
+ Here is the caller graph for this function:

◆ getEntry()

ilMDCreator::getEntry ( )

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

References getObjId(), and getObjType().

Referenced by __createGeneral().

176  : string
177  {
178  return $this->entry ?: 'il__' . $this->getObjType() . '_' . $this->getObjId();
179  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getKeyword()

ilMDCreator::getKeyword ( )

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

References $keyword.

Referenced by __createGeneral().

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

◆ getKeywordLanguage()

ilMDCreator::getKeywordLanguage ( )

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

Referenced by __createGeneral().

157  {
158  return new ilMDLanguageItem($this->title_lng);
159  }
+ Here is the caller graph for this function:

◆ getLanguage()

ilMDCreator::getLanguage ( )

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

Referenced by __createGeneral().

122  {
123  return new ilMDLanguageItem($this->title_lng);
124  }
+ Here is the caller graph for this function:

◆ getObjId()

ilMDCreator::getObjId ( )

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

References $obj_id.

Referenced by getEntry().

141  : int
142  {
143  return $this->obj_id;
144  }
+ Here is the caller graph for this function:

◆ getObjType()

ilMDCreator::getObjType ( )

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

References $obj_type.

Referenced by getEntry().

146  : string
147  {
148  return $this->obj_type;
149  }
+ Here is the caller graph for this function:

◆ getRBACId()

ilMDCreator::getRBACId ( )

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

References $rbac_id.

136  : int
137  {
138  return $this->rbac_id;
139  }

◆ getStructure()

ilMDCreator::getStructure ( )

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

Referenced by __createGeneral().

186  : string
187  {
188  return $this->structure ?: 'Hierarchical';
189  }
+ Here is the caller graph for this function:

◆ getTitle()

ilMDCreator::getTitle ( )

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

References $title.

Referenced by __createGeneral().

81  : string
82  {
83  return $this->title;
84  }
+ Here is the caller graph for this function:

◆ getTitleLanguage()

ilMDCreator::getTitleLanguage ( )

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

Referenced by __createGeneral().

102  {
103  return new ilMDLanguageItem($this->title_lng);
104  }
+ Here is the caller graph for this function:

◆ setCatalog()

ilMDCreator::setCatalog ( string  $a_cat)

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

161  : void
162  {
163  $this->catalog = $a_cat;
164  }

◆ setDescription()

ilMDCreator::setDescription ( string  $a_desc)

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

86  : void
87  {
88  $this->description = $a_desc;
89  }

◆ setDescriptionLanguage()

ilMDCreator::setDescriptionLanguage ( string  $a_lng)

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

106  : void
107  {
108  $this->title_lng = $a_lng;
109  }

◆ setEntry()

ilMDCreator::setEntry ( string  $a_entry)

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

171  : void
172  {
173  $this->entry = $a_entry;
174  }

◆ setKeyword()

ilMDCreator::setKeyword ( string  $a_key)

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

126  : void
127  {
128  $this->keyword = $a_key;
129  }

◆ setKeywordLanguage()

ilMDCreator::setKeywordLanguage ( string  $a_lng)

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

151  : void
152  {
153  $this->title_lng = $a_lng;
154  }

◆ setLanguage()

ilMDCreator::setLanguage ( string  $a_lng)

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

116  : void
117  {
118  $this->title_lng = $a_lng;
119  }

◆ setStructure()

ilMDCreator::setStructure ( string  $a_structure)

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

181  : void
182  {
183  $this->structure = $a_structure;
184  }

◆ setTitle()

ilMDCreator::setTitle ( string  $a_title)

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

76  : void
77  {
78  $this->title = $a_title;
79  }

◆ setTitleLanguage()

ilMDCreator::setTitleLanguage ( string  $a_lng)

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

96  : void
97  {
98  $this->title_lng = $a_lng;
99  }

Field Documentation

◆ $catalog

string ilMDCreator::$catalog = ''
private

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

◆ $description

string ilMDCreator::$description = ''
private

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

Referenced by getDescription().

◆ $entry

string ilMDCreator::$entry = ''
private

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

◆ $keyword

string ilMDCreator::$keyword = ''
private

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

Referenced by getKeyword().

◆ $md_obj

ilMD ilMDCreator::$md_obj
protected

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

◆ $obj_id

int ilMDCreator::$obj_id
private

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

Referenced by getObjId().

◆ $obj_type

string ilMDCreator::$obj_type

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

Referenced by getObjType().

◆ $rbac_id

int ilMDCreator::$rbac_id
private

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

Referenced by getRBACId().

◆ $structure

string ilMDCreator::$structure = ''
private

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

◆ $title

string ilMDCreator::$title = ''
private

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

Referenced by getTitle().

◆ $title_lng

string ilMDCreator::$title_lng = ''
private

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


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