ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 (protected 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
 

Detailed Description

Taxonomy GS tool provider.

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

Definition at line 27 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 80 of file class.ilTaxonomyGSToolProvider.php.

Referenced by getToolsForContextStack().

80  : string
81  {
82  $target_gui = $gui_path[count($gui_path) - 1];
83  $tax_exp = new ilTaxonomyExplorerGUI(
84  $gui_path,
85  $parent_cmd,
86  $tax_id,
87  $target_gui,
88  $cmd
89  );
90 
91  return $tax_exp->getHTML();
92  }
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 46 of file class.ilTaxonomyGSToolProvider.php.

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

46  : array
47  {
48  global $DIC;
49 
50  $lng = $DIC->language();
51  $lng->loadLanguageModule("tax");
52 
53  $title = $lng->txt("tax_taxonomy");
54  $icon = $DIC->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("standard/icon_tax.svg"), $title);
55 
56  $tools = [];
57  $additional_data = $called_contexts->current()->getAdditionalData();
58  if ($additional_data->is(self::SHOW_TAX_TREE, true)) {
59  $iff = fn(
60  $id
61  ): \ILIAS\GlobalScreen\Identification\IdentificationInterface => $this->identification_provider->contextAwareIdentifier($id);
62  $l = fn(
63  string $content
64  ): \ILIAS\UI\Component\Legacy\Content => $this->dic->ui()->factory()->legacy()->content($content);
65  $tools[] = $this->factory->tool($iff("tree"))
66  ->withTitle($title)
67  ->withSymbol($icon)
68  ->withContentWrapper(fn(
69  ): \ILIAS\UI\Component\Legacy\Content => $l($this->getEditTree(
70  $additional_data->get(self::TAX_TREE_GUI_PATH),
71  $additional_data->get(self::TAX_ID),
72  $additional_data->get(self::TAX_TREE_CMD),
73  $additional_data->get(self::TAX_TREE_PARENT_CMD)
74  )));
75  }
76 
77  return $tools;
78  }
getEditTree(array $gui_path, int $tax_id, string $cmd, string $parent_cmd)
Interface Observer Contains several chained tasks and infos about them.
factory()
global $DIC
Definition: shib_login.php:22
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
legacy()
expected output: > ILIAS shows the rendered Component.
Definition: legacy.php:29
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
global $lng
Definition: privfeed.php:31
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ 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: