ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
class.ReadingTimeDBRepo.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
/* Copyright (c) 1998-2022 ILIAS open source, GPLv3, see LICENSE */
6
7
namespace
ILIAS\Blog\ReadingTime
;
8
12
class
ReadingTimeDBRepo
13
{
14
protected \ilDBInterface
$db
;
15
16
public
function
__construct
()
17
{
18
global
$DIC
;
19
$this->db = $DIC->database();
20
}
21
22
public
function
isActivated
(
int
$lm_id): bool
23
{
24
$db =
$this->db
;
25
$set = $db->
queryF
(
26
"SELECT act_est_reading_time FROM il_blog "
.
27
" WHERE id = %s "
,
28
[
"integer"
],
29
[$lm_id]
30
);
31
if
($rec = $db->fetchAssoc($set)) {
32
return
(
bool
) $rec[
"act_est_reading_time"
];
33
}
34
return
false
;
35
}
36
37
public
function
activate
(
int
$lm_id,
bool
$activated): void
38
{
39
$db =
$this->db
;
40
$db->
update
(
41
"il_blog"
,
42
[
43
"act_est_reading_time"
=> [
"integer"
, $activated]
44
],
45
[
// where
46
"id"
=> [
"integer"
, $lm_id]
47
]
48
);
49
}
50
}
ILIAS\Blog\ReadingTime\ReadingTimeDBRepo\__construct
__construct()
Definition:
class.ReadingTimeDBRepo.php:16
ILIAS\Blog\ReadingTime\ReadingTimeDBRepo
Definition:
class.ReadingTimeDBRepo.php:12
ilDBInterface\update
update(string $table_name, array $values, array $where)
$where MUST contain existing columns only.
ILIAS\Blog\ReadingTime\ReadingTimeDBRepo\$db
ilDBInterface $db
Definition:
class.ReadingTimeDBRepo.php:14
$DIC
global $DIC
Definition:
feed.php:28
ilDBInterface\queryF
queryF(string $query, array $types, array $values)
ILIAS\Blog\ReadingTime\ReadingTimeDBRepo\activate
activate(int $lm_id, bool $activated)
Definition:
class.ReadingTimeDBRepo.php:37
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:21
ILIAS\Blog\ReadingTime\ReadingTimeDBRepo\isActivated
isActivated(int $lm_id)
Definition:
class.ReadingTimeDBRepo.php:22
Modules
Blog
ReadingTime
class.ReadingTimeDBRepo.php
Generated on Wed Sep 10 2025 14:10:33 for ILIAS by
1.8.13 (using
Doxyfile
)