◆ __construct()
ilPageActivationDBRepository::__construct |
( |
\ilDBInterface |
$db = null | ) |
|
◆ get()
ilPageActivationDBRepository::get |
( |
string |
$parent_type, |
|
|
array |
$ids, |
|
|
bool |
$check_scheduled_activation = false , |
|
|
string |
$lang = "" |
|
) |
| |
Get activation data for a set of page ids.
- Parameters
-
string | $parent_type | |
array | $ids | |
bool | $check_scheduled_activation | |
string | $lang | |
- Returns
- array
Definition at line 35 of file class.ilPageActivationDBRepository.php.
References $db, $lang, and ilUtil\now().
44 "SELECT page_id, active, activation_start, activation_end, show_activation_info FROM page_object WHERE " .
45 $db->in(
"page_id", $ids,
false,
"integer") .
46 " AND parent_type = %s AND lang = %s",
52 while ($rec =
$db->fetchAssoc($set)) {
53 if (!$rec[
"active"] && $check_scheduled_activation) {
54 if ($now >= $rec[
"activation_start"] &&
55 $now <= $rec[
"activation_end"]) {
56 $active[$rec[
"page_id"]] = [
58 "start" => $rec[
"activation_start"],
59 "end" => $rec[
"activation_end"],
60 "show_info" => (bool) $rec[
"show_activation_info"]
63 $active[$rec[
"page_id"]] = [
65 "start" => $rec[
"activation_start"],
66 "end" => $rec[
"activation_end"],
67 "show_info" => (bool) $rec[
"show_activation_info"]
71 $active[$rec[
"page_id"]] = [
72 "active" => (bool) $rec[
"active"],
static now()
Return current timestamp in Y-m-d H:i:s format.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
◆ $db
ilPageActivationDBRepository::$db |
|
protected |
The documentation for this class was generated from the following file: