ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLMEditGSToolProvider Class Reference

Learning module editing GS tool provider. More...

+ Inheritance diagram for ilLMEditGSToolProvider:
+ Collaboration diagram for ilLMEditGSToolProvider:

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_TREE = 'show_tree'
 

Private Member Functions

 getContent ()
 

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

Learning module editing GS tool provider.

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

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

Member Function Documentation

◆ getContent()

ilLMEditGSToolProvider::getContent ( )
private
Parameters
int$ref_id
Returns
string

Definition at line 60 of file class.ilLMEditGSToolProvider.php.

References $_GET, and $service.

Referenced by getToolsForContextStack().

60  : string
61  {
63  $lm = $service->getLearningModule();
64 
65  $exp = new ilLMEditorExplorerGUI("illmeditorgui", "showTree", $lm);
66 
67  return $exp->getHTML();
68  }
$_GET["client_id"]
LM editor explorer GUI class.
$service
Definition: result.php:17
Main service init and factory.
+ Here is the caller graph for this function:

◆ getToolsForContextStack()

ilLMEditGSToolProvider::getToolsForContextStack ( CalledContexts  $called_contexts)

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

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

References ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), getContent(), and ilUtil\getImagePath().

29  : array
30  {
31  $tools = [];
32  $additional_data = $called_contexts->current()->getAdditionalData();
33  if ($additional_data->is(self::SHOW_TREE, true)) {
34  $title = $this->dic->language()->txt('objs_st');
35  $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("outlined/icon_chp.svg"), $title);
36 
37  $iff = function ($id) {
38  return $this->identification_provider->contextAwareIdentifier($id);
39  };
40  $l = function (string $content) {
41  return $this->dic->ui()->factory()->legacy($content);
42  };
43  $tools[] = $this->factory->tool($iff("tree"))
44  ->withTitle($title)
45  ->withSymbol($icon)
46  ->withContentWrapper(function () use ($l) {
47  return $l($this->getContent());
48  });
49  }
50 
51  return $tools;
52  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:

◆ isInterestedInContexts()

ilLMEditGSToolProvider::isInterestedInContexts ( )

Field Documentation

◆ SHOW_TREE

const ilLMEditGSToolProvider::SHOW_TREE = 'show_tree'

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