ILIAS  release_8 Revision v8.24
ilWorkspaceGSToolProvider Class Reference

Workspace GS tool provider. More...

+ Inheritance diagram for ilWorkspaceGSToolProvider:
+ Collaboration diagram for ilWorkspaceGSToolProvider:

Public Member Functions

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

Data Fields

const SHOW_WS_TREE = 'show_ws_tree'
 

Private Member Functions

 getTree ()
 

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

Workspace GS tool provider.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Member Function Documentation

◆ getToolsForContextStack()

ilWorkspaceGSToolProvider::getToolsForContextStack ( CalledContexts  $called_contexts)
Parameters
CalledContexts$called_contexts
Returns
Tool[] These Slates can be passed to the MainMenu dynamic for a specific location/context.
See also
DynamicProvider

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

Definition at line 21 of file class.ilWorkspaceGSToolProvider.php.

21 : array
22 {
23 $tools = [];
24 $additional_data = $called_contexts->current()->getAdditionalData();
25
26 $title = $this->dic->language()->txt("objs_fold");
27
28 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard("fold", $title);
29
30 if ($additional_data->is(self::SHOW_WS_TREE, true)) {
31 $iff = function ($id) {
32 return $this->identification_provider->contextAwareIdentifier($id);
33 };
34 $l = function (string $content) {
35 return $this->dic->ui()->factory()->legacy($content);
36 };
37 $ref_id = $called_contexts->current()->getReferenceId()->toInt();
38 $tools[] = $this->factory->tool($iff("tree"))
39 ->withTitle($title)
40 ->withSymbol($icon)
41 ->withContentWrapper(function () use ($l) {
42 return $l($this->getTree());
43 });
44 }
45
46 return $tools;
47 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
$ref_id
Definition: ltiauth.php:67

References $id, $ref_id, ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), and getTree().

+ Here is the call graph for this function:

◆ getTree()

ilWorkspaceGSToolProvider::getTree ( )
private

Definition at line 49 of file class.ilWorkspaceGSToolProvider.php.

49 : string
50 {
51 global $DIC;
52
53 $user = $DIC->user();
54 $exp = new ilWorkspaceExplorerGUI($user->getId(), ["ilPersonalWorkspaceGUI", "ilObjWorkspaceFolderGUI"], "render", "ilObjWorkspaceFolderGUI", "", "wsp_id");
55 $exp->setTypeWhiteList(array("wsrt", "wfld"));
56 $exp->setSelectableTypes(array("wsrt", "wfld"));
57 $exp->setLinkToNodeClass(true);
58 $exp->setAjax(false);
59 $exp->setActivateHighlighting(true);
60
61 return $exp->getHTML(true);
62 }
Explorer for selecting a personal workspace item.
global $DIC
Definition: feed.php:28

References $DIC.

Referenced by getToolsForContextStack().

+ Here is the caller graph for this function:

◆ isInterestedInContexts()

ilWorkspaceGSToolProvider::isInterestedInContexts ( )

Field Documentation

◆ SHOW_WS_TREE

const ilWorkspaceGSToolProvider::SHOW_WS_TREE = 'show_ws_tree'

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