ILIAS
trunk Revision v11.0_alpha-1702-gfd3ecb7f852
◀ 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
class.ReadingTimeManager.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Blog\ReadingTime
;
22
26
class
ReadingTimeManager
27
{
28
protected \ILIAS\COPage\ReadingTime\ReadingTimeManager
$page_manager
;
29
protected
ReadingTimeDBRepo
$repo
;
30
protected \ilSetting
$blog_set
;
31
32
public
function
__construct
()
33
{
34
$this->blog_set = new \ilSetting(
"blga"
);
35
$this->repo =
new
ReadingTimeDBRepo
();
36
$this->page_manager = new \ILIAS\COPage\ReadingTime\ReadingTimeManager();
37
}
38
39
public
function
isGloballyActivated
(): bool
40
{
41
return
(
bool
) $this->blog_set->get(
"est_reading_time"
);
42
}
43
44
public
function
isActivated
(
int
$blog_id): bool
45
{
46
return
$this->repo->isActivated($blog_id);
47
}
48
49
public
function
activate
(
int
$blog_id,
bool
$activate): void
50
{
51
$is_active = $this->repo->isActivated($blog_id);
52
$this->repo->activate($blog_id, $activate);
53
if
(!$is_active && $activate) {
54
$this->page_manager->setMissingReadingTimes(
"blp"
, $blog_id);
55
}
56
}
57
61
public
function
getReadingTime
(
int
$blog_id,
int
$bl_page_id): ?
int
62
{
63
if
(!$this->
isActivated
($blog_id)) {
64
return
null
;
65
}
66
return
max(1, $this->page_manager->getTimeForId(
"blp"
, $bl_page_id));
67
}
68
}
ILIAS\Blog\ReadingTime\ReadingTimeManager\getReadingTime
getReadingTime(int $blog_id, int $bl_page_id)
Definition:
class.ReadingTimeManager.php:61
ILIAS\Blog\ReadingTime\ReadingTimeManager\__construct
__construct()
Definition:
class.ReadingTimeManager.php:32
ILIAS\Blog\ReadingTime\ReadingTimeDBRepo
Definition:
class.ReadingTimeDBRepo.php:26
ILIAS\Blog\ReadingTime\ReadingTimeManager\$blog_set
ilSetting $blog_set
Definition:
class.ReadingTimeManager.php:30
ILIAS\Blog\ReadingTime\ReadingTimeManager\isActivated
isActivated(int $blog_id)
Definition:
class.ReadingTimeManager.php:44
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:142
ILIAS\Blog\ReadingTime\ReadingTimeManager\isGloballyActivated
isGloballyActivated()
Definition:
class.ReadingTimeManager.php:39
ILIAS\Blog\ReadingTime\ReadingTimeManager
Definition:
class.ReadingTimeManager.php:26
ILIAS\Blog\ReadingTime\ReadingTimeManager\activate
activate(int $blog_id, bool $activate)
Definition:
class.ReadingTimeManager.php:49
ILIAS\Blog\ReadingTime
Definition:
class.BlogSettingsGUI.php:21
ILIAS\Blog\ReadingTime\ReadingTimeManager\$repo
ReadingTimeDBRepo $repo
Definition:
class.ReadingTimeManager.php:29
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ILIAS\Blog\ReadingTime\ReadingTimeManager\$page_manager
ILIAS COPage ReadingTime ReadingTimeManager $page_manager
Definition:
class.ReadingTimeManager.php:28
components
ILIAS
Blog
ReadingTime
class.ReadingTimeManager.php
Generated on Thu Apr 3 2025 23:02:25 for ILIAS by
1.8.13 (using
Doxyfile
)