|
| getData (string $parent_type, array $ids, bool $check_scheduled_activation=false, string $lang="") |
|
◆ __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 getData().
48 foreach ($this->
getData($parent_type, $ids, $check_scheduled_activation,
"-") as $k => $v) {
53 foreach ($this->
getData($parent_type, $ids, $check_scheduled_activation,
$lang) as $k => $v) {
getData(string $parent_type, array $ids, bool $check_scheduled_activation=false, string $lang="")
◆ getData()
ilPageActivationDBRepository::getData |
( |
string |
$parent_type, |
|
|
array |
$ids, |
|
|
bool |
$check_scheduled_activation = false , |
|
|
string |
$lang = "" |
|
) |
| |
|
protected |
Definition at line 60 of file class.ilPageActivationDBRepository.php.
References $db, $lang, and ilUtil\now().
Referenced by get().
64 "SELECT page_id, active, activation_start, activation_end, show_activation_info FROM page_object WHERE " .
65 $db->in(
"page_id", $ids,
false,
"integer") .
66 " AND parent_type = %s AND lang = %s",
72 while ($rec =
$db->fetchAssoc($set)) {
73 if (!$rec[
"active"] && $check_scheduled_activation) {
74 if ($now >= $rec[
"activation_start"] &&
75 $now <= $rec[
"activation_end"]) {
76 $active[$rec[
"page_id"]] = [
78 "start" => $rec[
"activation_start"],
79 "end" => $rec[
"activation_end"],
80 "show_info" => (bool) $rec[
"show_activation_info"]
83 $active[$rec[
"page_id"]] = [
85 "start" => $rec[
"activation_start"],
86 "end" => $rec[
"activation_end"],
87 "show_info" => (bool) $rec[
"show_activation_info"]
91 $active[$rec[
"page_id"]] = [
92 "active" => (bool) $rec[
"active"],
static now()
Return current timestamp in Y-m-d H:i:s format.
◆ $db
ilPageActivationDBRepository::$db |
|
protected |
The documentation for this class was generated from the following file: