ILIAS  release_8 Revision v8.23
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 34 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 61 of file class.ilMDCreator.php.

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

Member Function Documentation

◆ __createGeneral()

ilMDCreator::__createGeneral ( )

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

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

Referenced by create().

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

◆ create()

ilMDCreator::create ( )

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

References __createGeneral().

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

◆ getCatalog()

ilMDCreator::getCatalog ( )

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

Referenced by __createGeneral().

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

◆ getDescription()

ilMDCreator::getDescription ( )

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

References $description.

Referenced by __createGeneral().

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

◆ getDescriptionLanguage()

ilMDCreator::getDescriptionLanguage ( )

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

Referenced by __createGeneral().

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

◆ getEntry()

ilMDCreator::getEntry ( )

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

References getObjId(), and getObjType().

Referenced by __createGeneral().

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

◆ getKeyword()

ilMDCreator::getKeyword ( )

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

References $keyword.

Referenced by __createGeneral().

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

◆ getKeywordLanguage()

ilMDCreator::getKeywordLanguage ( )

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

Referenced by __createGeneral().

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

◆ getLanguage()

ilMDCreator::getLanguage ( )

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

Referenced by __createGeneral().

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

◆ getObjId()

ilMDCreator::getObjId ( )

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

References $obj_id.

Referenced by getEntry().

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

◆ getObjType()

ilMDCreator::getObjType ( )

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

References $obj_type.

Referenced by getEntry().

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

◆ getRBACId()

ilMDCreator::getRBACId ( )

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

References $rbac_id.

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

◆ getStructure()

ilMDCreator::getStructure ( )

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

Referenced by __createGeneral().

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

◆ getTitle()

ilMDCreator::getTitle ( )

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

References $title.

Referenced by __createGeneral().

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

◆ getTitleLanguage()

ilMDCreator::getTitleLanguage ( )

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

Referenced by __createGeneral().

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

◆ setCatalog()

ilMDCreator::setCatalog ( string  $a_cat)

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

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

◆ setDescription()

ilMDCreator::setDescription ( string  $a_desc)

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

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

◆ setDescriptionLanguage()

ilMDCreator::setDescriptionLanguage ( string  $a_lng)

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

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

◆ setEntry()

ilMDCreator::setEntry ( string  $a_entry)

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

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

◆ setKeyword()

ilMDCreator::setKeyword ( string  $a_key)

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

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

◆ setKeywordLanguage()

ilMDCreator::setKeywordLanguage ( string  $a_lng)

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

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

◆ setLanguage()

ilMDCreator::setLanguage ( string  $a_lng)

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

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

◆ setStructure()

ilMDCreator::setStructure ( string  $a_structure)

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

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

◆ setTitle()

ilMDCreator::setTitle ( string  $a_title)

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

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

◆ setTitleLanguage()

ilMDCreator::setTitleLanguage ( string  $a_lng)

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

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

Field Documentation

◆ $catalog

string ilMDCreator::$catalog = ''
private

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

◆ $description

string ilMDCreator::$description = ''
private

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

Referenced by getDescription().

◆ $entry

string ilMDCreator::$entry = ''
private

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

◆ $keyword

string ilMDCreator::$keyword = ''
private

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

Referenced by getKeyword().

◆ $md_obj

ilMD ilMDCreator::$md_obj
protected

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

◆ $obj_id

int ilMDCreator::$obj_id
private

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

Referenced by getObjId().

◆ $obj_type

string ilMDCreator::$obj_type

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

Referenced by getObjType().

◆ $rbac_id

int ilMDCreator::$rbac_id
private

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

Referenced by getRBACId().

◆ $structure

string ilMDCreator::$structure = ''
private

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

◆ $title

string ilMDCreator::$title = ''
private

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

Referenced by getTitle().

◆ $title_lng

string ilMDCreator::$title_lng = ''
private

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


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