ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables 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 (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
 $identification_provider
 
 $context_collection
 
 $factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

Workspace GS tool provider.

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

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

Member Function Documentation

◆ getToolsForContextStack()

ilWorkspaceGSToolProvider::getToolsForContextStack ( CalledContexts  $called_contexts)

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

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

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

29  : array
30  {
31  $tools = [];
32  $additional_data = $called_contexts->current()->getAdditionalData();
33 
34  $title = $this->dic->language()->txt("objs_fold");
35 
36  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard("fold", $title)->withIsOutlined(true);
37 
38  if ($additional_data->is(self::SHOW_WS_TREE, true)) {
39  $iff = function ($id) {
40  return $this->identification_provider->contextAwareIdentifier($id);
41  };
42  $l = function (string $content) {
43  return $this->dic->ui()->factory()->legacy($content);
44  };
45  $ref_id = $called_contexts->current()->getReferenceId()->toInt();
46  $tools[] = $this->factory->tool($iff("tree"))
47  ->withTitle($title)
48  ->withSymbol($icon)
49  ->withContentWrapper(function () use ($l) {
50  return $l($this->getTree());
51  });
52  }
53 
54  return $tools;
55  }
+ Here is the call graph for this function:

◆ getTree()

ilWorkspaceGSToolProvider::getTree ( )
private
Parameters
int$ref_id
Returns
string

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

References $DIC, and ilTreeExplorerGUI\setTypeWhiteList().

Referenced by getToolsForContextStack().

63  : string
64  {
65  global $DIC;
66 
67  $user = $DIC->user();
68  $exp = new ilWorkspaceExplorerGUI($user->getId(), ["ilPersonalWorkspaceGUI", "ilObjWorkspaceFolderGUI"], "render", "ilObjWorkspaceFolderGUI", "", "wsp_id");
69  $exp->setTypeWhiteList(array("wsrt", "wfld"));
70  $exp->setSelectableTypes(array("wsrt", "wfld"));
71  $exp->setLinkToNodeClass(true);
72  $exp->setAjax(false);
73  $exp->setActivateHighlighting(true);
74 
75  return $exp->getHTML(true);
76  }
setTypeWhiteList($a_val)
Set type white list.
global $DIC
Definition: goto.php:24
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 ( )

Field Documentation

◆ SHOW_WS_TREE

const ilWorkspaceGSToolProvider::SHOW_WS_TREE = 'show_ws_tree'

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