ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilPageUtil Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilPageUtil:

Static Public Member Functions

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) More...
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Utility class for pages, that is e.g. used in the repository to avoid including the whole large page object class

Definition at line 23 of file class.ilPageUtil.php.

Member Function Documentation

◆ _existsAndNotEmpty()

static ilPageUtil::_existsAndNotEmpty ( string  $a_parent_type,
int  $a_id,
string  $a_lang = "-" 
)
static

checks whether page exists and is not empty (may return true on some empty pages)

Parameters
string$a_parent_typeparent type
int$a_idpage id

Definition at line 31 of file class.ilPageUtil.php.

References $DIC, and $ilDB.

Referenced by ilPageObject\_existsAndNotEmpty(), ilStartUpGUI\getAuthPageEditorHtml(), ilContainerGUI\getContainerPageHTML(), ILIAS\UI\Implementation\Component\Layout\Page\PageManager\getDom(), ILIAS\UI\Implementation\Component\Layout\Page\PageManager\getHtml(), ilContainerStartObjectsContentGUI\getPageHTML(), ILIAS\Containter\Content\ObjectiveRenderer\renderObjective(), and ilHelpGUI\showPage().

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  }
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: