ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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 25 of file ilTestPlayerToolProvider.php.

Member Function Documentation

◆ getToolsForContextStack()

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

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

Definition at line 35 of file ilTestPlayerToolProvider.php.

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

35  : array
36  {
37  $additionalData = $called_contexts->current()->getAdditionalData();
38  $has_question_list = $additionalData->exists(ilTestPlayerLayoutProvider::TEST_PLAYER_QUESTIONLIST);
39 
40  if (!$has_question_list) {
41  return [];
42  }
43 
44  $ui = $this->dic->ui();
45  $lng = $this->dic->language();
46 
47  return [
48  $this->factory->tool(
49  $this->identification_provider->contextAwareIdentifier('tst_qst_list')
50  )->withSymbol($ui->factory()->symbol()->icon()->standard('tst', $lng->txt('more')))
51  ->withTitle($lng->txt('mainbar_button_label_questionlist'))
52  ->withContent(
53  $ui->factory()->legacy()->content(
54  $ui->renderer()->render(
55  $called_contexts->current()->getAdditionalData()->get(ilTestPlayerLayoutProvider::TEST_PLAYER_QUESTIONLIST)
56  )
57  )
58  )
59  ];
60  }
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: