ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables 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 (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 ($gui_path, $tax_id, $cmd, $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
 $identification_provider
 
 $context_collection
 
 $factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

Taxonomy GS tool provider.

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

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

Member Function Documentation

◆ getEditTree()

ilTaxonomyGSToolProvider::getEditTree (   $gui_path,
  $tax_id,
  $cmd,
  $parent_cmd 
)
private
Parameters
$gui_path
$tax_id
Returns
string

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

Referenced by getToolsForContextStack().

75  : string
76  {
77  $target_gui = $gui_path[count($gui_path) - 1];
78  $tax_exp = new ilTaxonomyExplorerGUI(
79  $gui_path,
80  $parent_cmd,
81  $tax_id,
82  $target_gui,
83  $cmd
84  );
85 
86  return $tax_exp->getHTML();
87  }
Taxonomy explorer GUI class.
+ Here is the caller graph for this function:

◆ getToolsForContextStack()

ilTaxonomyGSToolProvider::getToolsForContextStack ( CalledContexts  $called_contexts)

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

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

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

33  : array
34  {
35  global $DIC;
36 
37  $lng = $DIC->language();
38  $lng->loadLanguageModule("tax");
39 
40  $title = $lng->txt("tax_taxonomy");
41  $icon = $DIC->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("outlined/icon_tax.svg"), $title);
42 
43  $tools = [];
44  $additional_data = $called_contexts->current()->getAdditionalData();
45  if ($additional_data->is(self::SHOW_TAX_TREE, true)) {
46  $iff = function ($id) {
47  return $this->identification_provider->contextAwareIdentifier($id);
48  };
49  $l = function (string $content) {
50  return $this->dic->ui()->factory()->legacy($content);
51  };
52  $tools[] = $this->factory->tool($iff("tree"))
53  ->withTitle($title)
54  ->withSymbol($icon)
55  ->withContentWrapper(function () use ($additional_data, $l) {
56  return $l($this->getEditTree(
57  $additional_data->get(self::TAX_TREE_GUI_PATH),
58  $additional_data->get(self::TAX_ID),
59  $additional_data->get(self::TAX_TREE_CMD),
60  $additional_data->get(self::TAX_TREE_PARENT_CMD)
61  ));
62  });
63  }
64 
65  return $tools;
66  }
getEditTree($gui_path, $tax_id, $cmd, $parent_cmd)
$lng
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$DIC
Definition: xapitoken.php:46
+ 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: