ILIAS  release_8 Revision v8.23
ilTaxonomyGSToolProvider Class Reference

Taxonomy GS tool provider. More...

+ Inheritance diagram for ilTaxonomyGSToolProvider:
+ Collaboration diagram for ilTaxonomyGSToolProvider:

Public Member Functions

 isInterestedInContexts ()
 
 getToolsForContextStack (CalledContexts $called_contexts)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider
 __construct (Container $dic)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 

Data Fields

const SHOW_TAX_TREE = 'show_tax_tree'
 
const TAX_TREE_GUI_PATH = 'tax_tree_gui_path'
 
const TAX_ID = 'tax_id'
 
const TAX_TREE_CMD = 'tax_tree_cmd'
 
const TAX_TREE_PARENT_CMD = 'tax_tree_parent_cmd'
 

Private Member Functions

 getEditTree (array $gui_path, int $tax_id, string $cmd, string $parent_cmd)
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider
ToolIdentificationProviderInterface $identification_provider
 
ContextCollection $context_collection
 
ToolFactory $factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
Container $dic
 

Detailed Description

Taxonomy GS tool provider.

Author
Alex Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..com

Definition at line 11 of file class.ilTaxonomyGSToolProvider.php.

Member Function Documentation

◆ getEditTree()

ilTaxonomyGSToolProvider::getEditTree ( array  $gui_path,
int  $tax_id,
string  $cmd,
string  $parent_cmd 
)
private

Definition at line 64 of file class.ilTaxonomyGSToolProvider.php.

Referenced by getToolsForContextStack().

64  : string
65  {
66  $target_gui = $gui_path[count($gui_path) - 1];
67  $tax_exp = new ilTaxonomyExplorerGUI(
68  $gui_path,
69  $parent_cmd,
70  $tax_id,
71  $target_gui,
72  $cmd
73  );
74 
75  return $tax_exp->getHTML();
76  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getToolsForContextStack()

ilTaxonomyGSToolProvider::getToolsForContextStack ( CalledContexts  $called_contexts)

Implements ILIAS\GlobalScreen\Scope\Tool\Provider\DynamicToolProvider.

Definition at line 30 of file class.ilTaxonomyGSToolProvider.php.

References $DIC, $id, $lng, ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), getEditTree(), and ilUtil\getImagePath().

30  : array
31  {
32  global $DIC;
33 
34  $lng = $DIC->language();
35  $lng->loadLanguageModule("tax");
36 
37  $title = $lng->txt("tax_taxonomy");
38  $icon = $DIC->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("icon_tax.svg"), $title);
39 
40  $tools = [];
41  $additional_data = $called_contexts->current()->getAdditionalData();
42  if ($additional_data->is(self::SHOW_TAX_TREE, true)) {
43  $iff = fn (
44  $id
45  ): \ILIAS\GlobalScreen\Identification\IdentificationInterface => $this->identification_provider->contextAwareIdentifier($id);
46  $l = fn (
47  string $content
48  ): \ILIAS\UI\Component\Legacy\Legacy => $this->dic->ui()->factory()->legacy($content);
49  $tools[] = $this->factory->tool($iff("tree"))
50  ->withTitle($title)
51  ->withSymbol($icon)
52  ->withContentWrapper(fn (
53  ): \ILIAS\UI\Component\Legacy\Legacy => $l($this->getEditTree(
54  $additional_data->get(self::TAX_TREE_GUI_PATH),
55  $additional_data->get(self::TAX_ID),
56  $additional_data->get(self::TAX_TREE_CMD),
57  $additional_data->get(self::TAX_TREE_PARENT_CMD)
58  )));
59  }
60 
61  return $tools;
62  }
getEditTree(array $gui_path, int $tax_id, string $cmd, string $parent_cmd)
Class Factory.
$lng
Class ChatMainBarProvider .
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ isInterestedInContexts()

ilTaxonomyGSToolProvider::isInterestedInContexts ( )

Field Documentation

◆ SHOW_TAX_TREE

const ilTaxonomyGSToolProvider::SHOW_TAX_TREE = 'show_tax_tree'

◆ TAX_ID

const ilTaxonomyGSToolProvider::TAX_ID = 'tax_id'

◆ TAX_TREE_CMD

const ilTaxonomyGSToolProvider::TAX_TREE_CMD = 'tax_tree_cmd'

◆ TAX_TREE_GUI_PATH

const ilTaxonomyGSToolProvider::TAX_TREE_GUI_PATH = 'tax_tree_gui_path'

◆ TAX_TREE_PARENT_CMD

const ilTaxonomyGSToolProvider::TAX_TREE_PARENT_CMD = 'tax_tree_parent_cmd'

The documentation for this class was generated from the following file: