ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilBadge Class Reference
+ Collaboration diagram for ilBadge:

Public Member Functions

 __construct ($a_id=null)
 Constructor. More...
 
 getTypeInstance ()
 
 copy ($a_new_parent_id)
 
 getId ()
 
 setParentId ($a_id)
 
 getParentId ()
 
 setTypeId ($a_id)
 
 getTypeId ()
 
 setActive ($a_value)
 
 isActive ()
 
 setTitle ($a_value)
 
 getTitle ()
 
 setDescription ($a_value)
 
 getDescription ()
 
 setCriteria ($a_value)
 
 getCriteria ()
 
 setValid ($a_value)
 
 getValid ()
 
 setConfiguration (array $a_value=null)
 
 getConfiguration ()
 
 getImage ()
 
 uploadImage (array $a_upload_meta)
 
 importImage ($a_name, $a_file)
 
 getImagePath ($a_full_path=true)
 
 create ()
 
 update ()
 
 delete ()
 
 getParentMeta ()
 
 getStaticUrl ()
 
 deleteStaticFiles ()
 

Static Public Member Functions

static getInstancesByParentId ($a_parent_id, array $a_filter=null)
 
static getInstancesByType ($a_type_id)
 
static getObjectInstances (array $a_filter=null)
 
static getExtendedTypeCaption (ilBadgeType $a_type)
 

Protected Member Functions

 setId ($a_id)
 
 setImage ($a_value)
 
 getFilePath ($a_id, $a_subdir=null)
 Init file system storage. More...
 
 read ($a_id)
 
 importDBRow (array $a_row)
 
 getPropertiesForStorage ()
 
 prepareJson ($a_base_url, $a_img_suffix)
 

Protected Attributes

 $id
 
 $parent_id
 
 $type_id
 
 $active
 
 $title
 
 $desc
 
 $image
 
 $valid
 
 $config
 
 $criteria
 

Detailed Description

Definition at line 12 of file class.ilBadge.php.

Constructor & Destructor Documentation

◆ __construct()

ilBadge::__construct (   $a_id = null)

Constructor.

Parameters
int$a_id
Returns
self

Definition at line 31 of file class.ilBadge.php.

32 {
33 if($a_id)
34 {
35 $this->read($a_id);
36 }
37 }
read($a_id)

References read().

+ Here is the call graph for this function:

Member Function Documentation

◆ copy()

ilBadge::copy (   $a_new_parent_id)

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

102 {
103 global $lng;
104
105 $this->setTitle($this->getTitle()." ".$lng->txt("copy_of_suffix"));
106 $this->setParentId($a_new_parent_id);
107 $this->setActive(false);
108
109 if($this->getId())
110 {
111 $img = $this->getImagePath();
112
113 $this->setId(null);
114 $this->create();
115
116 if($img)
117 {
118 // see uploadImage()
119 copy($img, $this->getImagePath());
120 }
121 }
122 }
setTitle($a_value)
copy($a_new_parent_id)
getImagePath($a_full_path=true)
setParentId($a_id)
setActive($a_value)
setId($a_id)
global $lng
Definition: privfeed.php:17

References $img, $lng, copy(), create(), getId(), getImagePath(), getTitle(), setActive(), setId(), setParentId(), and setTitle().

Referenced by copy(), and importImage().

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

◆ create()

ilBadge::create ( )

Definition at line 394 of file class.ilBadge.php.

395 {
396 global $ilDB;
397
398 if($this->getId())
399 {
400 return $this->update();
401 }
402
403 $id = $ilDB->nextId("badge_badge");
404 $this->setId($id);
405
406 $fields = $this->getPropertiesForStorage();
407
408 $fields["id"] = array("integer", $id);
409 $fields["parent_id"] = array("integer", $this->getParentId());
410 $fields["type_id"] = array("text", $this->getTypeId());
411
412 $ilDB->insert("badge_badge", $fields);
413 }
getPropertiesForStorage()
global $ilDB

References $id, $ilDB, getId(), getParentId(), getPropertiesForStorage(), getTypeId(), setId(), and update().

Referenced by copy(), and update().

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

◆ delete()

ilBadge::delete ( )

Definition at line 431 of file class.ilBadge.php.

432 {
433 global $ilDB;
434
435 if(!$this->getId())
436 {
437 return;
438 }
439
440 if(file_exists($this->getImagePath()))
441 {
442 unlink($this->getImagePath());
443 }
444
445 $this->deleteStaticFiles();
446
447 include_once "Services/Badge/classes/class.ilBadgeAssignment.php";
449
450 $ilDB->manipulate("DELETE FROM badge_badge".
451 " WHERE id = ".$ilDB->quote($this->getId(), "integer"));
452 }
static deleteByBadgeId($a_badge_id)
deleteStaticFiles()

References $ilDB, ilBadgeAssignment\deleteByBadgeId(), deleteStaticFiles(), getId(), and getImagePath().

+ Here is the call graph for this function:

◆ deleteStaticFiles()

ilBadge::deleteStaticFiles ( )

Definition at line 545 of file class.ilBadge.php.

546 {
547 // remove instance files
548 $path = ilBadgeHandler::getInstance()->getBadgePath($this);
549 if(is_dir($path))
550 {
552 }
553 }
$path
Definition: aliased.php:25
static getInstance()
Constructor.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively

References $path, ilUtil\delDir(), and ilBadgeHandler\getInstance().

Referenced by delete().

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

◆ getConfiguration()

ilBadge::getConfiguration ( )

Definition at line 271 of file class.ilBadge.php.

272 {
273 return $this->config;
274 }

References $config.

Referenced by getPropertiesForStorage(), and ilBadgeManagementGUI\setBadgeFormValues().

+ Here is the caller graph for this function:

◆ getCriteria()

ilBadge::getCriteria ( )

Definition at line 246 of file class.ilBadge.php.

247 {
248 return $this->criteria;
249 }

References $criteria.

Referenced by getPropertiesForStorage(), and ilBadgeManagementGUI\setBadgeFormValues().

+ Here is the caller graph for this function:

◆ getDescription()

ilBadge::getDescription ( )

Definition at line 236 of file class.ilBadge.php.

237 {
238 return $this->desc;
239 }

References $desc.

Referenced by getPropertiesForStorage(), and ilBadgeManagementGUI\setBadgeFormValues().

+ Here is the caller graph for this function:

◆ getExtendedTypeCaption()

static ilBadge::getExtendedTypeCaption ( ilBadgeType  $a_type)
static

Definition at line 555 of file class.ilBadge.php.

556 {
557 global $lng;
558
559 return $a_type->getCaption()." (".
560 ($a_type instanceof ilBadgeAuto
561 ? $lng->txt("badge_subtype_auto")
562 : $lng->txt("badge_subtype_manual")).")";
563 }
Manual Badge Auto.
$a_type
Definition: workflow.php:93

References $a_type, and $lng.

Referenced by ilBadgeTableGUI\getItems(), ilBadgeUserTableGUI\getItems(), ilObjectBadgeTableGUI\getItems(), ilBadgeTableGUI\initFilter(), ilObjectBadgeTableGUI\initFilter(), and ilBadgeManagementGUI\listBadges().

+ Here is the caller graph for this function:

◆ getFilePath()

ilBadge::getFilePath (   $a_id,
  $a_subdir = null 
)
protected

Init file system storage.

Parameters
type$a_id
type$a_subdir
Returns
string

Definition at line 339 of file class.ilBadge.php.

340 {
341 include_once "Services/Badge/classes/class.ilFSStorageBadge.php";
342 $storage = new ilFSStorageBadge($a_id);
343 $storage->create();
344
345 $path = $storage->getAbsolutePath()."/";
346
347 if($a_subdir)
348 {
349 $path .= $a_subdir."/";
350
351 if(!is_dir($path))
352 {
353 mkdir($path);
354 }
355 }
356
357 return $path;
358 }

References $path.

Referenced by getImagePath().

+ Here is the caller graph for this function:

◆ getId()

ilBadge::getId ( )

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

187 {
188 return $this->id;
189 }

References $id.

Referenced by copy(), ilBadgeHandler\countStaticBadgeInstances(), create(), delete(), ilBadgeHandler\getBadgePath(), getImagePath(), update(), and uploadImage().

+ Here is the caller graph for this function:

◆ getImage()

ilBadge::getImage ( )

Definition at line 281 of file class.ilBadge.php.

282 {
283 return $this->image;
284 }

References $image.

Referenced by getImagePath(), getPropertiesForStorage(), and ilBadgeManagementGUI\setBadgeFormValues().

+ Here is the caller graph for this function:

◆ getImagePath()

ilBadge::getImagePath (   $a_full_path = true)

Definition at line 316 of file class.ilBadge.php.

317 {
318 if($this->getId())
319 {
320 $suffix = strtolower(array_pop(explode(".", $this->getImage())));
321 if ($a_full_path)
322 {
323 return $this->getFilePath($this->getId()) . "img" . $this->getId() . "." . $suffix;
324 }
325 else
326 {
327 return "img" . $this->getId() . "." . $suffix;
328 }
329 }
330 }
getFilePath($a_id, $a_subdir=null)
Init file system storage.

References getFilePath(), getId(), and getImage().

Referenced by copy(), delete(), ilBadgeAssignment\getImagePath(), importImage(), ilBadgeManagementGUI\setBadgeFormValues(), and uploadImage().

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

◆ getInstancesByParentId()

static ilBadge::getInstancesByParentId (   $a_parent_id,
array  $a_filter = null 
)
static

Definition at line 39 of file class.ilBadge.php.

40 {
41 global $ilDB;
42
43 $res = array();
44
45 $sql = "SELECT * FROM badge_badge".
46 " WHERE parent_id = ".$ilDB->quote($a_parent_id);
47
48 if($a_filter)
49 {
50 if($a_filter["title"])
51 {
52 $sql .= " AND ".$ilDB->like("title", "text", "%".trim($a_filter["title"])."%");
53 }
54 if($a_filter["type"])
55 {
56 $sql .= " AND type_id = ".$ilDB->quote($a_filter["type"], "integer");
57 }
58 }
59
60 $set = $ilDB->query($sql.
61 " ORDER BY title");
62 while($row = $ilDB->fetchAssoc($set))
63 {
64 $obj = new self();
65 $obj->importDBRow($row);
66 $res[] = $obj;
67 }
68
69 return $res;
70 }

References $ilDB, $res, and $row.

Referenced by ilBadgeHandler\getAvailableManualBadges(), ilBadgeAssignment\getInstancesByParentId(), ilBadgeTableGUI\getItems(), and ilBadgeUserTableGUI\getItems().

+ Here is the caller graph for this function:

◆ getInstancesByType()

static ilBadge::getInstancesByType (   $a_type_id)
static

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

73 {
74 global $ilDB;
75
76 $res = array();
77
78 $set = $ilDB->query("SELECT * FROM badge_badge".
79 " WHERE type_id = ".$ilDB->quote($a_type_id).
80 " ORDER BY title");
81 while($row = $ilDB->fetchAssoc($set))
82 {
83 $obj = new self();
84 $obj->importDBRow($row);
85 $res[] = $obj;
86 }
87
88 return $res;
89 }

References $ilDB, $res, and $row.

Referenced by ilBadgeHandler\triggerEvaluation().

+ Here is the caller graph for this function:

◆ getObjectInstances()

static ilBadge::getObjectInstances ( array  $a_filter = null)
static

Definition at line 124 of file class.ilBadge.php.

125 {
126 global $ilDB;
127
128 $res = $raw = array();
129
130 $where = "";
131
132 if($a_filter["type"])
133 {
134 $where .= " AND bb.type_id = ".$ilDB->quote($a_filter["type"], "text");
135 }
136 if($a_filter["title"])
137 {
138 $where .= " AND ".$ilDB->like("bb.title", "text", "%".$a_filter["title"]."%");
139 }
140 if($a_filter["object"])
141 {
142 $where .= " AND ".$ilDB->like("od.title", "text", "%".$a_filter["object"]."%");
143 }
144
145 $set = $ilDB->query("SELECT bb.*, od.title parent_title, od.type parent_type".
146 " FROM badge_badge bb".
147 " JOIN object_data od ON (bb.parent_id = od.obj_id)".
148 " WHERE od.type <> ".$ilDB->quote("bdga", "text").
149 $where);
150 while($row = $ilDB->fetchAssoc($set))
151 {
152 $raw[] = $row;
153 }
154
155 $set = $ilDB->query("SELECT bb.*, od.title parent_title, od.type parent_type".
156 " FROM badge_badge bb".
157 " JOIN object_data_del od ON (bb.parent_id = od.obj_id)".
158 " WHERE od.type <> ".$ilDB->quote("bdga", "text").
159 $where);
160 while($row = $ilDB->fetchAssoc($set))
161 {
162 $row["deleted"] = true;
163 $raw[] = $row;
164 }
165
166 foreach($raw as $row)
167 {
168 // :TODO:
169
170 $res[] = $row;
171 }
172
173 return $res;
174 }

References $ilDB, $res, and $row.

Referenced by ilObjectBadgeTableGUI\getItems().

+ Here is the caller graph for this function:

◆ getParentId()

ilBadge::getParentId ( )

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

197 {
198 return $this->parent_id;
199 }

References $parent_id.

Referenced by create(), and getParentMeta().

+ Here is the caller graph for this function:

◆ getParentMeta()

ilBadge::getParentMeta ( )

Definition at line 474 of file class.ilBadge.php.

475 {
476 $parent_type = ilObject::_lookupType($this->getParentId());
477 if($parent_type)
478 {
479 $parent_title = ilObject::_lookupTitle($this->getParentId());
480 $deleted = false;
481 }
482 else
483 {
484 // already deleted?
485 include_once "Services/Object/classes/class.ilObjectDataDeletionLog.php";
486 $parent = ilObjectDataDeletionLog::get($this->getParentId());
487 if($parent["type"])
488 {
489 $parent_type = $parent["type"];
490 $parent_title = $parent["title"];
491 }
492 $deleted = true;
493 }
494
495 return array(
496 "id" => $this->getParentId(),
497 "type" => $parent_type,
498 "title" => $parent_title,
499 "deleted" => $deleted
500 );
501 }
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type

References ilObject\_lookupTitle(), ilObject\_lookupType(), ilObjectDataDeletionLog\get(), and getParentId().

+ Here is the call graph for this function:

◆ getPropertiesForStorage()

ilBadge::getPropertiesForStorage ( )
protected

Definition at line 454 of file class.ilBadge.php.

455 {
456 return array(
457 "active" => array("integer", $this->isActive()),
458 "title" => array("text", $this->getTitle()),
459 "descr" => array("text", $this->getDescription()),
460 "crit" => array("text", $this->getCriteria()),
461 "image" => array("text", $this->getImage()),
462 "valid" => array("text", $this->getValid()),
463 "conf" => array("text", $this->getConfiguration()
464 ? serialize($this->getConfiguration())
465 : null)
466 );
467 }
getConfiguration()

References getConfiguration(), getCriteria(), getDescription(), getImage(), getTitle(), getValid(), and isActive().

Referenced by create(), and update().

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

◆ getStaticUrl()

ilBadge::getStaticUrl ( )

Definition at line 523 of file class.ilBadge.php.

524 {
525 $path = ilBadgeHandler::getInstance()->getBadgePath($this);
526
527 $base_url = ILIAS_HTTP_PATH.substr($path, 1);
528
529 if(!file_exists($path."class.json"))
530 {
531 $img_suffix = array_pop(explode(".", $this->getImage()));
532
533 $json = json_encode($this->prepareJson($base_url, $img_suffix));
534 file_put_contents($path."class.json", $json);
535
536 // :TODO: scale?
537 copy($this->getImagePath(), $path."image.".$img_suffix);
538
539 file_put_contents($path."criteria.txt", $this->getCriteria());
540 }
541
542 return $base_url."class.json";
543 }
prepareJson($a_base_url, $a_img_suffix)

References $path, and ilBadgeHandler\getInstance().

+ Here is the call graph for this function:

◆ getTitle()

ilBadge::getTitle ( )

Definition at line 226 of file class.ilBadge.php.

227 {
228 return $this->title;
229 }

References $title.

Referenced by copy(), getPropertiesForStorage(), and ilBadgeManagementGUI\setBadgeFormValues().

+ Here is the caller graph for this function:

◆ getTypeId()

ilBadge::getTypeId ( )

Definition at line 206 of file class.ilBadge.php.

207 {
208 return $this->type_id;
209 }

References $type_id.

Referenced by create(), and getTypeInstance().

+ Here is the caller graph for this function:

◆ getTypeInstance()

ilBadge::getTypeInstance ( )

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

92 {
93 if($this->getTypeId())
94 {
95 include_once "./Services/Badge/classes/class.ilBadgeHandler.php";
96 $handler = ilBadgeHandler::getInstance();
97 return $handler->getTypeInstanceByUniqueId($this->getTypeId());
98 }
99 }

References ilBadgeHandler\getInstance(), and getTypeId().

+ Here is the call graph for this function:

◆ getValid()

ilBadge::getValid ( )

Definition at line 256 of file class.ilBadge.php.

257 {
258 return $this->valid;
259 }

References $valid.

Referenced by getPropertiesForStorage(), and ilBadgeManagementGUI\setBadgeFormValues().

+ Here is the caller graph for this function:

◆ importDBRow()

ilBadge::importDBRow ( array  $a_row)
protected

Definition at line 378 of file class.ilBadge.php.

379 {
380 $this->setId($a_row["id"]);
381 $this->setParentId($a_row["parent_id"]);
382 $this->setTypeId($a_row["type_id"]);
383 $this->setActive($a_row["active"]);
384 $this->setTitle($a_row["title"]);
385 $this->setDescription($a_row["descr"]);
386 $this->setCriteria($a_row["crit"]);
387 $this->setImage($a_row["image"]);
388 $this->setValid($a_row["valid"]);
389 $this->setConfiguration($a_row["conf"]
390 ? unserialize($a_row["conf"])
391 : null);
392 }
setCriteria($a_value)
setValid($a_value)
setConfiguration(array $a_value=null)
setTypeId($a_id)
setImage($a_value)
setDescription($a_value)

References setActive(), setConfiguration(), setCriteria(), setDescription(), setId(), setImage(), setParentId(), setTitle(), setTypeId(), and setValid().

Referenced by read().

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

◆ importImage()

ilBadge::importImage (   $a_name,
  $a_file 
)

Definition at line 305 of file class.ilBadge.php.

306 {
307 if(file_exists($a_file))
308 {
309 $this->setImage($a_name);
310 copy($a_file, $this->getImagePath()); // #18280
311
312 $this->update();
313 }
314 }

References copy(), getImagePath(), setImage(), and update().

+ Here is the call graph for this function:

◆ isActive()

ilBadge::isActive ( )

Definition at line 216 of file class.ilBadge.php.

217 {
218 return $this->active;
219 }

References $active.

Referenced by getPropertiesForStorage(), and ilBadgeManagementGUI\setBadgeFormValues().

+ Here is the caller graph for this function:

◆ prepareJson()

ilBadge::prepareJson (   $a_base_url,
  $a_img_suffix 
)
protected

Definition at line 508 of file class.ilBadge.php.

509 {
510 $json = new stdClass();
511 $json->{"@context"} = "https://w3id.org/openbadges/v1";
512 $json->type = "BadgeClass";
513 $json->id = $a_base_url."class.json";
514 $json->name = $this->getTitle();
515 $json->description = $this->getDescription();
516 $json->image = $a_base_url."image.".$a_img_suffix;
517 $json->criteria = $a_base_url."criteria.txt";
518 $json->issuer = ilBadgeHandler::getInstance()->getIssuerStaticUrl();
519
520 return $json;
521 }

◆ read()

ilBadge::read (   $a_id)
protected

Definition at line 365 of file class.ilBadge.php.

366 {
367 global $ilDB;
368
369 $set = $ilDB->query("SELECT * FROM badge_badge".
370 " WHERE id = ".$ilDB->quote($a_id, "integer"));
371 if($ilDB->numRows($set))
372 {
373 $row = $ilDB->fetchAssoc($set);
374 $this->importDBRow($row);
375 }
376 }
importDBRow(array $a_row)

References $ilDB, $row, and importDBRow().

Referenced by __construct().

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

◆ setActive()

ilBadge::setActive (   $a_value)

Definition at line 211 of file class.ilBadge.php.

212 {
213 $this->active = (bool)$a_value;
214 }

Referenced by copy(), and importDBRow().

+ Here is the caller graph for this function:

◆ setConfiguration()

ilBadge::setConfiguration ( array  $a_value = null)

Definition at line 261 of file class.ilBadge.php.

262 {
263 if(is_array($a_value) &&
264 !sizeof($a_value))
265 {
266 $a_value = null;
267 }
268 $this->config = $a_value;
269 }

Referenced by importDBRow().

+ Here is the caller graph for this function:

◆ setCriteria()

ilBadge::setCriteria (   $a_value)

Definition at line 241 of file class.ilBadge.php.

242 {
243 $this->criteria = trim($a_value);
244 }

Referenced by importDBRow().

+ Here is the caller graph for this function:

◆ setDescription()

ilBadge::setDescription (   $a_value)

Definition at line 231 of file class.ilBadge.php.

232 {
233 $this->desc = trim($a_value);
234 }

Referenced by importDBRow().

+ Here is the caller graph for this function:

◆ setId()

ilBadge::setId (   $a_id)
protected

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

182 {
183 $this->id = (int)$a_id;
184 }

Referenced by copy(), create(), and importDBRow().

+ Here is the caller graph for this function:

◆ setImage()

ilBadge::setImage (   $a_value)
protected

Definition at line 276 of file class.ilBadge.php.

277 {
278 $this->image = trim($a_value);
279 }

Referenced by importDBRow(), importImage(), and uploadImage().

+ Here is the caller graph for this function:

◆ setParentId()

ilBadge::setParentId (   $a_id)

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

192 {
193 $this->parent_id = (int)$a_id;
194 }

Referenced by copy(), and importDBRow().

+ Here is the caller graph for this function:

◆ setTitle()

ilBadge::setTitle (   $a_value)

Definition at line 221 of file class.ilBadge.php.

222 {
223 $this->title = trim($a_value);
224 }

Referenced by copy(), and importDBRow().

+ Here is the caller graph for this function:

◆ setTypeId()

ilBadge::setTypeId (   $a_id)

Definition at line 201 of file class.ilBadge.php.

202 {
203 $this->type_id = trim($a_id);
204 }

Referenced by importDBRow().

+ Here is the caller graph for this function:

◆ setValid()

ilBadge::setValid (   $a_value)

Definition at line 251 of file class.ilBadge.php.

252 {
253 $this->valid = trim($a_value);
254 }

Referenced by importDBRow().

+ Here is the caller graph for this function:

◆ update()

ilBadge::update ( )

Definition at line 415 of file class.ilBadge.php.

416 {
417 global $ilDB;
418
419 if(!$this->getId())
420 {
421 return $this->create();
422 }
423
424 $fields = $this->getPropertiesForStorage();
425
426 $ilDB->update("badge_badge", $fields,
427 array("id"=>array("integer", $this->getId()))
428 );
429 }

References $ilDB, create(), getId(), and getPropertiesForStorage().

Referenced by create(), importImage(), and uploadImage().

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

◆ uploadImage()

ilBadge::uploadImage ( array  $a_upload_meta)
Parameters
array$a_upload_meta
Exceptions
ilFileUtilsException

Definition at line 290 of file class.ilBadge.php.

291 {
292 if($this->getId() &&
293 $a_upload_meta["tmp_name"])
294 {
295 $this->setImage($a_upload_meta["name"]);
296 $path = $this->getImagePath();
297
298 if (ilUtil::moveUploadedFile($a_upload_meta["tmp_name"], $this->getImagePath(false), $path))
299 {
300 $this->update();
301 }
302 }
303 }
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file

References $path, getId(), getImagePath(), ilUtil\moveUploadedFile(), setImage(), and update().

+ Here is the call graph for this function:

Field Documentation

◆ $active

ilBadge::$active
protected

Definition at line 17 of file class.ilBadge.php.

Referenced by isActive().

◆ $config

ilBadge::$config
protected

Definition at line 22 of file class.ilBadge.php.

Referenced by getConfiguration().

◆ $criteria

ilBadge::$criteria
protected

Definition at line 23 of file class.ilBadge.php.

Referenced by getCriteria().

◆ $desc

ilBadge::$desc
protected

Definition at line 19 of file class.ilBadge.php.

Referenced by getDescription().

◆ $id

ilBadge::$id
protected

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

Referenced by create(), and getId().

◆ $image

ilBadge::$image
protected

Definition at line 20 of file class.ilBadge.php.

Referenced by getImage().

◆ $parent_id

ilBadge::$parent_id
protected

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

Referenced by getParentId().

◆ $title

ilBadge::$title
protected

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

Referenced by getTitle().

◆ $type_id

ilBadge::$type_id
protected

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

Referenced by getTypeId().

◆ $valid

ilBadge::$valid
protected

Definition at line 21 of file class.ilBadge.php.

Referenced by getValid().


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