ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getToolsForContextStack (CalledContexts $called_contexts)
 
 isInterestedInContexts ()
 

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
\ILIAS\GlobalScreen\Scope\Tool\Factory\Tool[]

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

Definition at line 35 of file ilTestPlayerToolProvider.php.

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

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

+ Here is the call graph for this function:

◆ isInterestedInContexts()

ilTestPlayerToolProvider::isInterestedInContexts ( )

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