3 declare(strict_types=1);
    45         ?
object $a_parent_obj,
    47         bool $a_sorting = 
false    53         $this->renderer = $DIC->ui()->renderer();
    54         $this->uiFactory = $DIC->ui()->factory();
    56         $this->
access = $DIC->access();
    62         if ($this->
access->checkAccess(
    65             $this->getParentObject()->getObject()->getRefId()
    67             $this->editable = 
true;
    77                 $this->
addColumn($this->
lng->txt(
'position'), 
'', 
'10px');
    83                     $this->
lng->txt(
'sorting_save')
    95             $this->
ctrl->getFormAction($this->getParentObject())
    97         $this->
setRowTemplate(
"tpl.webr_link_row.html", 
'Modules/WebResource');
   104         $this->link_sort_enabled = $a_status;
   116         $items = $this->web_link_repo->getAllItemsAsContainer(
true)
   121         foreach ($items as $item) {
   122             $tmp[
'position'] = ($counter++) * 10;
   123             $tmp[
'title'] = $item->getTitle();
   124             $tmp[
'description'] = $item->getDescription();
   125             $tmp[
'target'] = $item->getTarget();
   126             $tmp[
'link_id'] = $item->getLinkId();
   127             $tmp[
'internal'] = $item->isInternal();
   134     protected function fillRow(array $a_set): void
   136         $this->
ctrl->setParameterByClass(
   142         $this->tpl->setVariable(
'TITLE', $a_set[
'title']);
   143         if ($a_set[
'description']) {
   144             $this->tpl->setVariable(
'DESCRIPTION', $a_set[
'description']);
   147         $this->tpl->setVariable(
   149             $this->
ctrl->getLinkTarget($this->parent_obj, 
"callLink")
   152         if (!$a_set[
'internal']) {
   153             $this->tpl->setVariable(
'FRAME', 
' target="_blank"');
   154             $this->tpl->touchBlock(
'noopener');
   162             $this->tpl->setVariable(
'VAL_POS', $a_set[
'position']);
   163             $this->tpl->setVariable(
'VAL_ITEM', $a_set[
'link_id']);
   166         $dropDownItems = array(
   167             $this->uiFactory->button()->shy(
   168                 $this->
lng->txt(
'edit'),
   171             $this->uiFactory->button()->shy(
   172                 $this->
lng->txt(
'webr_deactivate'),
   175             $this->uiFactory->button()->shy(
   176                 $this->
lng->txt(
'delete'),
   177                 $this->
ctrl->getLinkTargetByClass(get_class($this->
getParentObject()), 
'confirmDeleteLink')
   180         $dropDown = $this->uiFactory->dropdown()->standard($dropDownItems)
   181                 ->withLabel($this->
lng->txt(
'actions'));
   182         $this->tpl->setVariable(
'ACTION_HTML', $this->renderer->render($dropDown));
 
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...
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
setEnableTitle(bool $a_enabletitle)
 
__construct(?object $a_parent_obj, string $a_parent_cmd, bool $a_sorting=false)
TODO Move most of this stuff to an init method. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
ilWebLinkRepository $web_link_repo
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
setEnableNumInfo(bool $a_val)
 
UIImplementationFactory $uiFactory
 
setLimit(int $a_limit=0, int $a_default_limit=0)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
addMultiCommand(string $a_cmd, string $a_text)
 
setEnableHeader(bool $a_enableheader)
 
enableLinkSorting(bool $a_status)