ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilPageUtil Class Reference

Utility class for pages, that is e.g. More...

+ Collaboration diagram for ilPageUtil:

Static Public Member Functions

static _existsAndNotEmpty ($a_parent_type, $a_id, $a_lang="-")
 checks whether page exists and is not empty (may return true on some empty pages) More...
 

Detailed Description

Utility class for pages, that is e.g.

used in the repository to avoid including the whole large page object class

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

Member Function Documentation

◆ _existsAndNotEmpty()

static ilPageUtil::_existsAndNotEmpty (   $a_parent_type,
  $a_id,
  $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 15 of file class.ilPageUtil.php.

References $ilDB, $query, and $row.

Referenced by ilPageObject\_existsAndNotEmpty(), ilContainerGUI\getContainerPageHTML(), ilStartUpGUI\getLoginPageEditorHTML(), ilContainerStartObjectsContentGUI\getPageHTML(), ilContainerObjectiveGUI\renderObjective(), and ilHelpGUI\showPage().

16  {
17  global $ilDB;
18 
19  // language must be set at least to "-"
20  if ($a_lang == "")
21  {
22  $a_lang = "-";
23  }
24  $and_lang = " AND lang = ".$ilDB->quote($a_lang, "text");
25 
26  $query = "SELECT page_id, is_empty FROM page_object WHERE page_id = ".$ilDB->quote($a_id, "integer")." ".
27  "AND parent_type= ".$ilDB->quote($a_parent_type, "text").$and_lang;
28 
29  $set = $ilDB->query($query);
30  if ($row = $ilDB->fetchAssoc($set))
31  {
32  if ($row["is_empty"] != 1)
33  {
34  return true;
35  }
36  }
37  return false;
38  }
global $ilDB
+ Here is the caller graph for this function:

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