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

Class ilSCORM2004PageLayout. More...

+ Collaboration diagram for ilSCORM2004PageLayout:

Public Member Functions

 __construct ($a_id)
 
 getXMLContent ()
 
 getPreview ()
 
 getTitle ()
 
 getId ()
 

Static Public Member Functions

static activeLayouts ()
 

Data Fields

const SEQ_TEMPLATE_DIR = './Modules/Scorm2004/templates/editor/page_layouts_temp/thumbnails'
 
 $layout_id = null
 

Private Member Functions

 generatePreview ()
 

Detailed Description

Class ilSCORM2004PageLayout.

Class for SCORM 2004 Page Layouts

Author
Hendrik Holtmann holtm.nosp@m.ann@.nosp@m.me.co.nosp@m.m
Version
$Id$

Definition at line 35 of file class.ilSCORM2004PageLayout.php.

Constructor & Destructor Documentation

◆ __construct()

ilSCORM2004PageLayout::__construct (   $a_id)

Definition at line 42 of file class.ilSCORM2004PageLayout.php.

42  {
43  $this->layout_id = $a_id;
44  }

Member Function Documentation

◆ activeLayouts()

static ilSCORM2004PageLayout::activeLayouts ( )
static

Definition at line 84 of file class.ilSCORM2004PageLayout.php.

References $ilDB, $query, $result, $row, and array.

85  {
86  global $ilDB;
87  $arr_layouts = array();
88  $query = "SELECT * FROM page_layout WHERE (active=1) ORDER BY title ";
89  $result = $ilDB->query($query);
90  while($row = $ilDB->fetchAssoc($result))
91  {
92  array_push($arr_layouts,new ilSCORM2004PageLayout($row['layout_id']));
93  }
94  return $arr_layouts;
95  }
$result
Create styles array
The data for the language used.
Class ilSCORM2004PageLayout.
global $ilDB

◆ generatePreview()

ilSCORM2004PageLayout::generatePreview ( )
private

Definition at line 77 of file class.ilSCORM2004PageLayout.php.

77  {
78 
79  //toimplement...generate Preview from XML
80 
81  }

◆ getId()

ilSCORM2004PageLayout::getId ( )

Definition at line 72 of file class.ilSCORM2004PageLayout.php.

References $layout_id.

◆ getPreview()

ilSCORM2004PageLayout::getPreview ( )

Definition at line 56 of file class.ilSCORM2004PageLayout.php.

56  {
57  //just returns manually created previews at the moment
58  return self::SEQ_TEMPLATE_DIR."/".$this->layout_id.".png";
59  }

◆ getTitle()

ilSCORM2004PageLayout::getTitle ( )

Definition at line 62 of file class.ilSCORM2004PageLayout.php.

References $ilDB, $r, $row, and array.

62  {
63  global $ilias, $ilDB;
64 
65  $r = $ilDB->queryF('SELECT title FROM page_layout WHERE layout_id = %s',
66  array('integer'),array($this->layout_id));
67  $row->$ilDB->fetchAssoc($r);
68 
69  return $row['title'];
70  }
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
global $ilDB

◆ getXMLContent()

ilSCORM2004PageLayout::getXMLContent ( )

Definition at line 47 of file class.ilSCORM2004PageLayout.php.

References $ilDB, $r, $row, and ilDBConstants\FETCHMODE_ASSOC.

47  {
48  global $ilias, $ilDB;
49  $r = $ilias->db->query("SELECT content FROM page_layout WHERE layout_id=".
50  $ilDB->quote($this->layout_id));
52  return $row['content'];
53  }
$r
Definition: example_031.php:79
global $ilDB

Field Documentation

◆ $layout_id

ilSCORM2004PageLayout::$layout_id = null

Definition at line 40 of file class.ilSCORM2004PageLayout.php.

Referenced by getId().

◆ SEQ_TEMPLATE_DIR

const ilSCORM2004PageLayout::SEQ_TEMPLATE_DIR = './Modules/Scorm2004/templates/editor/page_layouts_temp/thumbnails'

Definition at line 38 of file class.ilSCORM2004PageLayout.php.


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