ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.ModeFactory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Survey\Mode
;
22
23
use
ILIAS\Survey\InternalDomainService
;
24
use
ILIAS\Survey\InternalGUIService
;
25
use
ILIAS\Survey\InternalService
;
26
30
class
ModeFactory
31
{
33
protected
?array
$providers
=
null
;
34
protected
InternalService
$service
;
35
36
public
function
__construct
()
37
{
38
}
39
40
public
function
setInternalService
(
InternalService
$service): void
41
{
42
$this->service =
$service
;
43
}
44
protected
function
initProviders
(): void
45
{
46
if
(is_null($this->providers)) {
47
$gui = $this->service->gui();
48
$this->providers = [
49
new
Standard\ModeProvider
($gui),
50
new
Feedback360\ModeProvider
($gui),
51
new
SelfEvaluation\ModeProvider
($gui),
52
new
IndividualFeedback\ModeProvider
($gui)
53
];
54
}
55
}
56
57
public
function
getModeById
(
int
$id
):
ModeProvider
58
{
59
$this->
initProviders
();
60
foreach
($this->providers as
$provider
) {
61
if
($provider->getId() ===
$id
) {
62
$provider->setInternalService($this->service);
63
return
$provider
;
64
}
65
}
66
throw
new
ModeException
(
"Unknown mode: "
. $id);
67
}
68
}
InternalGUIService
ILIAS\Survey\Mode\ModeException
Definition:
class.ModeException.php:23
ILIAS\Survey\Mode\ModeFactory\__construct
__construct()
Definition:
class.ModeFactory.php:36
ILIAS\Survey\Mode\ModeFactory\$providers
array $providers
Definition:
class.ModeFactory.php:33
InternalDomainService
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:144
ILIAS\Survey\Mode
Definition:
class.AbstractUIModifier.php:21
$provider
$provider
Definition:
ltitoken.php:80
ILIAS\Survey\Mode\ModeFactory\setInternalService
setInternalService(InternalService $service)
Definition:
class.ModeFactory.php:40
ILIAS\Survey\Mode\IndividualFeedback\ModeProvider
Interface for modes.
Definition:
class.ModeProvider.php:30
ILIAS\Survey\Mode\ModeFactory\$service
InternalService $service
Definition:
class.ModeFactory.php:34
$id
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition:
plugin.php:23
ILIAS\Survey\Mode\ModeProvider
Interface for modes.
Definition:
interface.ModeProvider.php:29
ILIAS\Survey\Mode\ModeFactory\initProviders
initProviders()
Definition:
class.ModeFactory.php:44
ILIAS\Survey\Mode\ModeFactory
Definition:
class.ModeFactory.php:30
ILIAS\Survey\Mode\Feedback360\ModeProvider
Interface for modes.
Definition:
class.ModeProvider.php:30
ILIAS\Survey\InternalService
Survey internal service.
Definition:
class.InternalService.php:29
ILIAS\Survey\Mode\ModeFactory\getModeById
getModeById(int $id)
Definition:
class.ModeFactory.php:57
InternalService
components
ILIAS
Survey
Mode
class.ModeFactory.php
Generated on Sun Aug 31 2025 23:03:53 for ILIAS by
1.8.13 (using
Doxyfile
)