ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPageUtil.php
Go to the documentation of this file.
1<?php
2
24{
31 public static function _existsAndNotEmpty(
32 string $a_parent_type,
33 int $a_id,
34 string $a_lang = "-"
35 ): bool {
36 global $DIC;
37
38 $ilDB = $DIC->database();
39
40 // language must be set at least to "-"
41 if ($a_lang == "") {
42 $a_lang = "-";
43 }
44 $and_lang = " AND lang = " . $ilDB->quote($a_lang, "text");
45
46 $query = "SELECT page_id, is_empty FROM page_object WHERE page_id = " . $ilDB->quote($a_id, "integer") . " " .
47 "AND parent_type= " . $ilDB->quote($a_parent_type, "text") . $and_lang;
48
49 $set = $ilDB->query($query);
50 if ($row = $ilDB->fetchAssoc($set)) {
51 if ($row["is_empty"] != 1) {
52 return true;
53 }
54 }
55 return false;
56 }
57}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _existsAndNotEmpty(string $a_parent_type, int $a_id, string $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)
global $DIC
Definition: shib_login.php:26