19 declare(strict_types=1);
36 public function __construct(
int $a_server_id,
int $a_mid, ?
object $a_parent_obj,
string $a_parent_cmd)
39 $this->server_id = $a_server_id;
43 $this->
setId(
'ecs_node_mapping_table');
47 $this->
setTitle($this->
lng->txt(
'ecs_cms_directory_trees_tbl'));
50 $this->
setRowTemplate(
"tpl.ecs_node_mapping_tree_table_row.html",
"components/ILIAS/WebServices/ECS");
54 $this->ui_factory = $DIC->ui()->factory();
55 $this->ui_renderer = $DIC->ui()->renderer();
78 protected function fillRow(array $a_set): void
82 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'term']);
84 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'title']);
86 $this->tpl->setVariable(
'TXT_STATUS', $this->
lng->txt(
'status'));
93 $this->tpl->setVariable(
'EDIT_TITLE', $this->
ctrl->getLinkTarget($this->getParentObject(),
'dInitEditTree'));
95 $item[] = [$this->
lng->txt(
'edit'), $this->
ctrl->getLinkTarget($this->
getParentObject(),
'dInitEditTree')];
100 $this->
lng->txt(
'ecs_cms_tree_synchronize'),
105 $items[] = [$this->
lng->txt(
'delete'), $this->
ctrl->getLinkTarget($this->
getParentObject(),
'dConfirmDeleteTree')];
107 foreach ($items as $item) {
108 $render_items[] = $this->ui_factory->button()->shy(...$item);
110 $this->tpl->setVariable(
112 $this->ui_renderer->render($this->ui_factory->dropdown()->standard($render_items)->withLabel($this->
lng->txt(
'actions')))
129 $data[$counter][
'id'] = $tree_id;
135 $data[$counter][
'title'] = $node->
getTitle();
ILIAS UI Renderer $ui_renderer
ILIAS UI Factory $ui_factory
static lookupTreeIds(int $a_server_id, int $a_mid)
static getInstanceByServerMid(int $a_server_id, int $a_mid)
Get instance.
__construct(int $a_server_id, int $a_mid, ?object $a_parent_obj, string $a_parent_cmd)
Table gui constructor.
static lookupMappingStatus(int $a_server_id, int $a_mid, int $a_tree_id)
Lookup mapping status.
static mappingStatusToString(int $a_status)
Get mapping status as string.
static lookupTopTerm(int $a_server_id, int $a_mid, int $a_tree_id)
Lookup term (highest term in cms tree)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
static getInstanceByServerId(int $a_server_id)
Get singleton instance per server.
fillRow(array $a_set)
Fill row.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
parse()
Parse campusconnect.
__construct(Container $dic, ilPlugin $plugin)
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)
setEnableHeader(bool $a_enableheader)