19declare(strict_types=1);
33 $this->add_header = $a_add_header;
39 $this->obj_id = $a_obj_id;
48 if ($this->add_header) {
51 $this->weblink->toXML($this);
66 protected function init(): void
71 throw new UnexpectedValueException(
'No obj_id given: ');
77 throw new UnexpectedValueException(
78 'Invalid obj_id given: ' . $this->obj_id
81 if ($this->weblink->getType() !=
'webr') {
82 throw new UnexpectedValueException(
83 'Invalid obj_id given. Object is not of type webr'
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
__construct(bool $a_add_header)
ilObjLinkResource $weblink
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlSetGenCmt(string $genCmt)
Sets generated comment.
xmlHeader()
Writes xml header.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc