ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
ilTestPlayerToolProvider.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider
;
22
use
ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts
;
23
use
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection
;
24
25
class
ilTestPlayerToolProvider
extends
AbstractDynamicToolProvider
26
{
27
public
function
isInterestedInContexts
():
ContextCollection
28
{
29
return
$this->context_collection->
main
();
30
}
31
35
public
function
getToolsForContextStack
(
CalledContexts
$called_contexts): 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
}
61
}
ilTestPlayerToolProvider
Definition:
ilTestPlayerToolProvider.php:25
factory
factory()
Definition:
UITestHelper.php:61
ilTestPlayerToolProvider\getToolsForContextStack
getToolsForContextStack(CalledContexts $called_contexts)
Definition:
ilTestPlayerToolProvider.php:35
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\main
main()
Definition:
ContextCollection.php:92
CalledContexts
ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current
current()
Definition:
CalledContexts.php:33
ilTestPlayerLayoutProvider\TEST_PLAYER_QUESTIONLIST
const TEST_PLAYER_QUESTIONLIST
Definition:
class.ilTestPlayerLayoutProvider.php:50
ILIAS\GlobalScreen\Scope\MainMenu\Factory\withSymbol
withSymbol(Symbol $symbol)
Definition:
hasSymbolTrait.php:39
ContextCollection
ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts
Definition:
CalledContexts.php:29
ilTestPlayerToolProvider\isInterestedInContexts
isInterestedInContexts()
Definition:
ilTestPlayerToolProvider.php:27
AbstractDynamicToolProvider
$lng
global $lng
Definition:
privfeed.php:31
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection
Definition:
ContextCollection.php:30
ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider
Class AbstractDynamicToolProvider.
Definition:
AbstractDynamicToolProvider.php:33
components
ILIAS
Test
classes
Screen
ilTestPlayerToolProvider.php
Generated on Wed Sep 3 2025 23:04:03 for ILIAS by
1.8.13 (using
Doxyfile
)