ILIAS
trunk Revision v11.0_alpha-1769-g99a433fe2dc
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
SettingsManager.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Blog\Settings
;
22
23
use
ILIAS\Blog\InternalDataService
;
24
use
ILIAS\Blog\InternalRepoService
;
25
use
ILIAS\Blog\InternalDomainService
;
26
27
class
SettingsManager
28
{
29
public
function
__construct
(
30
protected
InternalDataService
$data
,
31
protected
InternalRepoService $repo,
32
protected
InternalDomainService
$domain
33
) {
34
}
35
36
37
public
function
create
(
Settings
$settings): void
38
{
39
$this->repo->settings()->create($settings);
40
}
41
42
public
function
update
(
Settings
$settings): void
43
{
44
$this->repo->settings()->update($settings);
45
}
46
47
public
function
getByObjId
(
int
$id
): ?
Settings
48
{
49
return
$this->repo->settings()->getByObjId($id);
50
}
51
52
public
function
clone
($from_id, $to_id): void
53
{
54
$settings = $this->repo->settings()->getByObjId($from_id);
55
$settings = $settings->withId($to_id);
56
$this->
update
($settings);
57
}
58
59
public
function
saveOrder
(
int
$id
, array $order): void
60
{
61
$this->repo->settings()->saveOrder($id, $order);
62
}
63
64
public
function
getOrderingOptions
(
65
Settings
$settings,
66
bool
$in_repository
67
): array {
68
$lng
= $this->domain->lng();
69
$order_options = [];
70
foreach
($settings->
getOrder
() as $item) {
71
$order_options[$item] =
$lng
->txt(
"blog_"
. $item);
72
}
73
74
$type =
"navigation"
;
75
if
(!isset($order_options[$type])) {
76
$order_options[$type] =
$lng
->txt(
"blog_"
. $type);
77
}
78
79
if
($in_repository) {
80
$type =
"authors"
;
81
if
(!isset($order_options[$type])) {
82
$order_options[$type] =
$lng
->txt(
"blog_"
. $type);
83
}
84
}
85
86
$type =
"keywords"
;
87
if
(!isset($order_options[$type])) {
88
$order_options[$type] =
$lng
->txt(
"blog_"
. $type);
89
}
90
91
return
$order_options;
92
}
93
}
ILIAS\MetaData\OERHarvester\Settings\Settings\Settings\getOrder
getOrder()
Definition:
Settings.php:139
InternalDataService
$data
$data
Definition:
ltiregistration.php:29
ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager\create
create(Settings $settings)
Definition:
SettingsManager.php:37
InternalDomainService
ILIAS\Export\InternalDomainService
Definition:
class.InternalDomainService.php:25
InternalRepoService
ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager\clone
clone($from_id, $to_id)
Definition:
SettingsManager.php:52
ILIAS\Blog\Settings
Definition:
class.BlockSettingsGUI.php:21
ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager\__construct
__construct(protected InternalDataService $data, protected InternalRepoService $repo, protected InternalDomainService $domain)
Definition:
SettingsManager.php:29
ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager\update
update(Settings $settings)
Definition:
SettingsManager.php:42
ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager
Definition:
SettingsManager.php:27
ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager\saveOrder
saveOrder(int $id, array $order)
Definition:
SettingsManager.php:59
ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager\getOrderingOptions
getOrderingOptions(Settings $settings, bool $in_repository)
Definition:
SettingsManager.php:64
ILIAS\MetaData\OERHarvester\Settings\Settings\SettingsManager\getByObjId
getByObjId(int $id)
Definition:
SettingsManager.php:47
$id
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition:
plugin.php:23
$lng
global $lng
Definition:
privfeed.php:31
SettingsInterface
components
ILIAS
Blog
Settings
SettingsManager.php
Generated on Sun Apr 13 2025 23:02:23 for ILIAS by
1.8.13 (using
Doxyfile
)