ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 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
 

Detailed Description

Workspace GS tool provider.

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

Definition at line 28 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 37 of file class.ilWorkspaceGSToolProvider.php.

37 : array
38 {
39 $tools = [];
40 $additional_data = $called_contexts->current()->getAdditionalData();
41
42 $title = $this->dic->language()->txt("objs_fold");
43
44 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard("fold", $title);
45
46 if ($additional_data->is(self::SHOW_WS_TREE, true)) {
47 $iff = function ($id) {
48 return $this->identification_provider->contextAwareIdentifier($id);
49 };
50 $l = function (string $content) {
51 return $this->dic->ui()->factory()->legacy()->content($content);
52 };
53 $ref_id = $called_contexts->current()->getReferenceId()->toInt();
54 $tools[] = $this->factory->tool($iff("tree"))
55 ->withTitle($title)
56 ->withSymbol($icon)
57 ->withContentWrapper(function () use ($l) {
58 return $l($this->getTree());
59 });
60 }
61
62 return $tools;
63 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
factory()
$ref_id
Definition: ltiauth.php:66

References $id, $ref_id, ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), factory(), getTree(), and ILIAS\GlobalScreen\Scope\Footer\Factory\withTitle().

+ Here is the call graph for this function:

◆ getTree()

ilWorkspaceGSToolProvider::getTree ( )
private

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

65 : string
66 {
67 global $DIC;
68
69 $user = $DIC->user();
70 $exp = new ilWorkspaceExplorerGUI($user->getId(), ["ilPersonalWorkspaceGUI", "ilObjWorkspaceFolderGUI"], "render", "ilObjWorkspaceFolderGUI", "", "wsp_id");
71 $exp->setTypeWhiteList(array("wsrt", "wfld"));
72 $exp->setSelectableTypes(array("wsrt", "wfld"));
73 $exp->setLinkToNodeClass(true);
74 $exp->setAjax(false);
75 $exp->setActivateHighlighting(true);
76
77 return $exp->getHTML(true);
78 }
Explorer for selecting a personal workspace item.
global $DIC
Definition: shib_login.php:26

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: