19declare(strict_types=1);
47 protected \ilCtrlInterface
$ctrl;
53 $this->ui_factory =
$DIC->ui()->factory();
54 $this->
renderer = $DIC->ui()->renderer();
55 $this->get_request =
$DIC->http()->wrapper()->query();
56 $this->
http = $DIC->http();
58 $this->
ctrl = $DIC->ctrl();
61 $this->
ctrl->saveParameterByClass(self::class,
'ref_id');
63 $data_factory = new \ILIAS\Data\Factory();
66 ILIAS_HTTP_PATH .
'/' .
67 $this->ctrl->getLinkTargetByClass([self::class],
null,
null,
true)
71 explode(
'\\', __NAMESPACE__),
72 self::PARENT_NODE_ID_PARAMETER,
76 $object_definition =
$DIC[
'objDefinition'];
78 $branch_node_types = $object_definition->getExplorerContainerTypes();
79 $leaf_node_types = array_diff($object_definition->getAllRepositoryTypes(
false), $branch_node_types);
84 $this->async_node_id_parameter,
85 $async_node_url_builder,
87 $DIC->repositoryTree(),
90 (
int) (
$DIC->settings()->get(
'rep_tree_limit_number') ?? self::MAX_BRANCH_NODE_DEPTH),
92 $DIC->repositoryTree()->getParentId(
93 $DIC->repositoryTree()->getRootId(),
100 if (!$this->
ctrl->isAsynch()) {
101 throw new \RuntimeException(self::class .
' must be called asynchronously.');
103 if ($this->
ctrl->getNextClass($this)) {
104 throw new \LogicException(self::class .
' must be the only command class.');
107 if (!$this->get_request->has($this->async_node_id_parameter->getName())) {
111 $parent_node_id = (
int) $this->get_request->retrieve(
112 $this->async_node_id_parameter->getName(),
125 $child_node_iterator = $this->node_retrieval->getNodes(
126 $this->ui_factory->input()->field()->node(),
127 $this->ui_factory->symbol()->icon(),
128 (
string) $parent_node_id,
132 foreach ($child_node_iterator as $node) {
133 $html .= $this->
renderer->renderAsync($node);
140 $this->
http->saveResponse(
141 $this->
http->response()
142 ->withHeader(
'Content-Type',
'text/html; charset=utf-8')
143 ->withBody(Streams::ofString($html))
145 $this->
http->sendResponse();
146 $this->
http->close();
Builds a Color from either hex- or rgb values.
Stream factory which enables the user to create streams without the knowledge of the concrete class.
URLBuilderToken $async_node_id_parameter
UINodeRetrieval $node_retrieval
const int MAX_BRANCH_NODE_DEPTH
RequestWrapper $get_request
ilObjMainMenuAccess $access
ILIAS Refinery Factory $refinery
renderAsyncNodeChildren(int $parent_node_id)
sendHtmlResponse(string $html)
const string PARENT_NODE_ID_PARAMETER
Interface GlobalHttpState.
Interface RequestWrapper.
This is how the factory for UI elements looks.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc