19 declare(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 127 $new_obj = parent::cloneObject($target_id, $copy_id, $omit_tree);
131 $items = $this->
getWebLinkRepo()->getAllItemsAsContainer()->getItems();
134 foreach ($items as $item) {
138 $item->getDescription(),
141 $item->getParameters()
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')
210 foreach ($items as $item) {
212 $item->toXML($writer, $position);
createAllItemsInDraftContainer(ilWebLinkDraftItemsContainer $container)
toXML(ilXmlWriter $writer)
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...
appendXML(string $a_str)
append xml string to document
xmlEndTag(string $tag)
Writes an endtag.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupSortMode(int $a_obj_id)
cloneObject(int $target_id, int $copy_id=0, bool $omit_tree=false)
cloneMetaData(ilObject $target_obj)
Copy meta data.
doMDUpdateListener(string $a_element)
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...
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
ilWebLinkDatabaseRepository $repo
static _getFirstLink(int $a_webr_id)
Get first link item Check before with _isSingular() if there is more or less than one...
__construct(int $a_id=0, bool $a_call_by_reference=true)