ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilAdminGSToolProvider.php
Go to the documentation of this file.
1<?php
2
6
13{
14 const SHOW_ADMIN_TREE = 'show_admin_tree';
15
16
21 {
22 return $this->context_collection->main()->administration();
23 }
24
25
29 public function getToolsForContextStack(CalledContexts $called_contexts) : array
30 {
31 $tools = [];
32 $additional_data = $called_contexts->current()->getAdditionalData();
33 if ($additional_data->is(self::SHOW_ADMIN_TREE, true)) {
34 $iff = function ($id) {
35 return $this->identification_provider->contextAwareIdentifier($id, true);
36 };
37 $l = function (string $content) {
38 return $this->dic->ui()->factory()->legacy($content);
39 };
40 $tools[] = $this->factory->tool($iff("tree"))
41 ->withTitle("Tree")
42 ->withContentWrapper(function () use ($l) {
43 return $l($this->getTree());
44 });
45 }
46
47 return $tools;
48 }
49
50
56 private function getTree() : string
57 {
58 $exp = new ilAdministrationExplorerGUI("ilAdministrationGUI", "showTree");
59
60 return $exp->getHTML();
61 }
62}
An exception for terminatinating execution or to throw for unit testing.
Administration GS tool provider.
getToolsForContextStack(CalledContexts $called_contexts)
@inheritDoc
Administration explorer GUI class.