ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 

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.

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

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  }
factory()
$ref_id
Definition: ltiauth.php:65
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ getTree()

ilWorkspaceGSToolProvider::getTree ( )
private

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

References $DIC, and ilTreeExplorerGUI\setTypeWhiteList().

Referenced by getToolsForContextStack().

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  }
setTypeWhiteList(array $a_val)
Set type white list.
global $DIC
Definition: shib_login.php:22
Explorer for selecting a personal workspace item.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isInterestedInContexts()

ilWorkspaceGSToolProvider::isInterestedInContexts ( )
Returns
ContextCollection

Implements ILIAS\GlobalScreen\ScreenContext\ScreenContextAwareProvider.

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

References ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\main().

+ Here is the call graph for this function:

Field Documentation

◆ SHOW_WS_TREE

const ilWorkspaceGSToolProvider::SHOW_WS_TREE = 'show_ws_tree'

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