ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
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
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ReadingTimeManager.php
Go to the documentation of this file.
1
<?php
2
19
namespace
ILIAS\Blog\ReadingTime
;
20
24
class
ReadingTimeManager
25
{
29
protected
$page_manager
;
30
34
protected
$repo
;
35
39
protected
$blog_set
;
40
41
public
function
__construct
()
42
{
43
$this->blog_set = new \ilSetting(
"blga"
);
44
$this->repo =
new
ReadingTimeDBRepo
();
45
$this->page_manager = new \ILIAS\COPage\ReadingTime\ReadingTimeManager();
46
}
47
48
public
function
isGloballyActivated
(): bool
49
{
50
return
(
bool
) $this->blog_set->get(
"est_reading_time"
);
51
}
52
53
public
function
isActivated
(
int
$blog_id): bool
54
{
55
return
$this->repo->isActivated($blog_id);
56
}
57
58
public
function
activate
(
int
$blog_id,
bool
$activate): void
59
{
60
$is_active = $this->repo->isActivated($blog_id);
61
$this->repo->activate($blog_id, $activate);
62
if
(!$is_active && $activate) {
63
$this->page_manager->setMissingReadingTimes(
"blp"
, $blog_id);
64
}
65
}
66
70
public
function
getReadingTime
(
int
$blog_id,
int
$bl_page_id): ?
int
71
{
72
if
(!$this->
isActivated
($blog_id)) {
73
return
null;
74
}
75
return
max(1, $this->page_manager->getTimeForId(
"blp"
, $bl_page_id));
76
}
77
}
ILIAS\Blog\ReadingTime\ReadingTimeManager\getReadingTime
getReadingTime(int $blog_id, int $bl_page_id)
Definition:
class.ReadingTimeManager.php:70
ILIAS\Blog\ReadingTime\ReadingTimeManager\__construct
__construct()
Definition:
class.ReadingTimeManager.php:41
ILIAS\Blog\ReadingTime\ReadingTimeManager\$repo
$repo
Definition:
class.ReadingTimeManager.php:34
ILIAS\Blog\ReadingTime\ReadingTimeDBRepo
Definition:
class.ReadingTimeDBRepo.php:10
ILIAS\Blog\ReadingTime\ReadingTimeManager\isActivated
isActivated(int $blog_id)
Definition:
class.ReadingTimeManager.php:53
ILIAS\Blog\ReadingTime\ReadingTimeManager\$blog_set
$blog_set
Definition:
class.ReadingTimeManager.php:39
ILIAS\Blog\ReadingTime\ReadingTimeManager\isGloballyActivated
isGloballyActivated()
Definition:
class.ReadingTimeManager.php:48
ILIAS\Blog\ReadingTime\ReadingTimeManager\$page_manager
$page_manager
Definition:
class.ReadingTimeManager.php:29
ILIAS\Blog\ReadingTime\ReadingTimeManager
Definition:
class.ReadingTimeManager.php:24
ILIAS\Blog\ReadingTime\ReadingTimeManager\activate
activate(int $blog_id, bool $activate)
Definition:
class.ReadingTimeManager.php:58
ILIAS\Blog\ReadingTime
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.BlogSettingsGUI.php:19
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
Modules
Blog
ReadingTime
class.ReadingTimeManager.php
Generated on Fri Apr 4 2025 22:01:36 for ILIAS by
1.8.13 (using
Doxyfile
)