ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAdminGSToolProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
24
31{
32 public const SHOW_ADMIN_TREE = 'show_admin_tree';
33
35 {
36 return $this->context_collection->main()->administration();
37 }
38
39 public function getToolsForContextStack(CalledContexts $called_contexts): array
40 {
41 $tools = [];
42 $additional_data = $called_contexts->current()->getAdditionalData();
43 if ($additional_data->is(self::SHOW_ADMIN_TREE, true)) {
44 $iff = function ($id) {
45 return $this->identification_provider->contextAwareIdentifier($id, true);
46 };
47 $l = function (string $content) {
48 return $this->dic->ui()->factory()->legacy()->content($content);
49 };
50 $tools[] = $this->factory->tool($iff("tree"))
51 ->withTitle("Tree")
52 ->withContentWrapper(function () use ($l) {
53 return $l($this->getTree());
54 });
55 }
56
57 return $tools;
58 }
59
60 private function getTree(): string
61 {
62 return (new ilAdministrationExplorerGUI("ilAdministrationGUI", "showTree"))->getHTML();
63 }
64}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
factory()
Administration GS tool provider.
getToolsForContextStack(CalledContexts $called_contexts)
Administration explorer GUI class.