19declare(strict_types=1);
29 public function __construct(
int $a_id = 0,
bool $a_call_by_reference =
true)
37 if (isset($this->repo)) {
48 $new_id = parent::create();
58 return parent::update();
64 if (!is_object($md_gen = $md->getGeneral())) {
67 $title = $md_gen->getTitle();
69 foreach ($md_gen->getDescriptionIds() as
$id) {
70 $md_des = $md_gen->getDescription(
$id);
71 $description = $md_des->getDescription();
75 $a_element ===
'General' &&
79 $item = $this->
getWebLinkRepo()->getAllItemsAsContainer()->getFirstItem();
86 $item->getParameters()
91 $a_element ===
'General' &&
103 public function delete():
bool
106 if (!parent::delete()) {
125 bool $omit_tree =
false
131 $items = $this->
getWebLinkRepo()->getAllItemsAsContainer()->getItems();
134 foreach ($items as $item) {
138 $item->getDescription(),
141 $item->getParameters()
148 $new_web_link_repo->createAllItemsInDraftContainer(
$container);
151 if ($new_web_link_repo->doesOnlyOneItemExist(
true)) {
155 $new_obj->getTitle(),
156 $new_obj->getDescription(),
159 $item->getParameters()
161 $new_web_link_repo->updateItem($item, $draft);
168 $attribs = array(
"obj_id" =>
"il_" .
IL_INST_ID .
"_webr_" . $this->
getId(
176 $md2xml->startExport();
184 array(
'type' =>
'Manual')
192 array(
'type' =>
'Title')
197 if ($this->getWebLinkRepo()->doesListExist()) {
199 $writer->
xmlElement(
'ListTitle', [], $this->getTitle());
200 $writer->
xmlElement(
'ListDescription', [], $this->getDescription());
205 $items = $this->getWebLinkRepo()->getAllItemsAsContainer()
210 foreach ($items as $item) {
212 $item->toXML($writer, $position);
static _lookupSortMode(int $a_obj_id)
static _getFirstLink(int $a_webr_id)
Get first link item Check before with _isSingular() if there is more or less than one.
cloneObject(int $target_id, int $copy_id=0, bool $omit_tree=false)
__construct(int $a_id=0, bool $a_call_by_reference=true)
toXML(ilXmlWriter $writer)
doMDUpdateListener(string $a_element)
ilWebLinkDatabaseRepository $repo
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
cloneMetaData(ilObject $target_obj)
Copy meta data.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlEndTag(string $tag)
Writes an endtag.
appendXML(string $a_str)
append xml string to document
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc