ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTaxonomyClassificationExplorerGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 public function __construct(
25 string $parent_cmd,
26 int $tax_id,
27 string $target_gui,
28 string $target_cmd,
29 string $id = ""
30 ) {
31 global $DIC;
32
36 $tax_id,
39 $id
40 );
41 }
42
43 public function getNodeContent($a_node): string
44 {
45 $rn = $this->getRootNode();
46 if ($rn["child"] == $a_node["child"]) {
47 $title = ilObject::_lookupTitle($this->tax_tree->getTreeId());
48 } else {
49 $title = $a_node["title"];
50 }
51 return $title;
52 }
53
54 protected function createNode(
55 \ILIAS\UI\Component\Tree\Node\Factory $factory,
56 $record
57 ): \ILIAS\UI\Component\Tree\Node\Node {
58 $nodeIconPath = $this->getNodeIcon($record);
59
60 $icon = null;
61 if ($nodeIconPath !== '') {
62 $icon = $this->ui
63 ->factory()
64 ->symbol()
65 ->icon()
66 ->custom($nodeIconPath, $this->getNodeIconAlt($record));
67 }
68
69 $node = $factory->simple($this->getNodeContent($record), $icon)
70 ->withLink(new \ILIAS\Data\URI(ILIAS_HTTP_PATH . "/#tax_node_" . $record["child"]));
71 if (in_array($this->getNodeId($record), $this->selected_nodes)) {
72 $node = $node->withHighlighted(true);
73 }
74 return $node;
75 }
76
77
78}
static _lookupTitle(int $obj_id)
createNode(\ILIAS\UI\Component\Tree\Node\Factory $factory, $record)
__construct( $parent_obj, string $parent_cmd, int $tax_id, string $target_gui, string $target_cmd, string $id="")
Constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getNodeId($a_node)
Get id for node.
getNodeIconAlt($a_node)
Get node icon alt attribute.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $DIC
Definition: shib_login.php:26