ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestPlayerToolProvider Class Reference
+ Inheritance diagram for ilTestPlayerToolProvider:
+ Collaboration diagram for ilTestPlayerToolProvider:

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 ()
 

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

Definition at line 24 of file ilTestPlayerToolProvider.php.

Member Function Documentation

◆ getToolsForContextStack()

ilTestPlayerToolProvider::getToolsForContextStack ( CalledContexts  $called_contexts)
Returns
[]

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

Definition at line 34 of file ilTestPlayerToolProvider.php.

References $lng, ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), factory(), ilTestPlayerLayoutProvider\TEST_PLAYER_QUESTIONLIST, and ILIAS\GlobalScreen\Scope\MainMenu\Factory\withSymbol().

34  : array
35  {
36  $additionalData = $called_contexts->current()->getAdditionalData();
37  $has_question_list = $additionalData->exists(ilTestPlayerLayoutProvider::TEST_PLAYER_QUESTIONLIST);
38 
39  if (!$has_question_list) {
40  return [];
41  }
42 
43  $ui = $this->dic->ui();
44  $lng = $this->dic->language();
45 
46  return [
47  $this->factory->tool(
48  $this->identification_provider->contextAwareIdentifier('tst_qst_list')
49  )->withSymbol($ui->factory()->symbol()->icon()->standard('tst', $lng->txt('more')))
50  ->withTitle($lng->txt('mainbar_button_label_questionlist'))
51  ->withContent(
52  $ui->factory()->legacy(
53  $ui->renderer()->render(
54  $called_contexts->current()->getAdditionalData()->get(ilTestPlayerLayoutProvider::TEST_PLAYER_QUESTIONLIST)
55  )
56  )
57  )
58  ];
59  }
factory()
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ isInterestedInContexts()

ilTestPlayerToolProvider::isInterestedInContexts ( )

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