22    const SEQ_TEMPLATE_DIR = 
'./Modules/Scorm2004/templates/editor/page_layouts_temp/thumbnails';
 
   37        $this->db = 
$DIC->database();
 
   41            $this->layout_id = 
$ilDB->nextId(
"page_layout");
 
   42            $ilDB->insert(
"page_layout", array(
 
   43                "layout_id" => array(
"integer", $this->layout_id),
 
   44                "active" => array(
"integer", 0),
 
   45                "title" => array(
"text", 
""),
 
   46                "content" => array(
"clob", 
""),
 
   47                "description" => array(
"text", 
"")
 
   55            $this->active = 
false;
 
   57            $this->layout_id = $a_id;
 
   73        $this->description = $a_description;
 
   83        $this->title = $a_title;
 
   96        $this->style_id = $a_val;
 
  104        return $this->style_id;
 
  112        $this->special_page = $a_val;
 
  120        return $this->special_page;
 
  130            $this->modules = array_intersect($a_values, 
$valid);
 
  132            $this->modules = array();
 
  153        $query = 
"UPDATE page_layout SET active=" . 
$ilDB->quote($a_setting, 
"integer") .
 
  154            " WHERE layout_id =" . 
$ilDB->quote($this->layout_id, 
"integer");
 
  161    public function delete()
 
  165        $query = 
"DELETE FROM page_layout WHERE layout_id =" . 
$ilDB->quote($this->layout_id, 
"integer");
 
  176        $mod_scorm = $mod_portfolio = 0;
 
  177        if (in_array(self::MODULE_SCORM, $this->modules)) {
 
  180        if (in_array(self::MODULE_PORTFOLIO, $this->modules)) {
 
  184        $query = 
"UPDATE page_layout SET title=" . 
$ilDB->quote($this->title, 
"text") .
 
  185            ",description =" . 
$ilDB->quote($this->description, 
"text") .
 
  186            ",active =" . 
$ilDB->quote($this->active, 
"integer") .
 
  189            ",mod_scorm =" . 
$ilDB->quote($mod_scorm, 
"integer") .
 
  190            ",mod_portfolio =" . 
$ilDB->quote($mod_portfolio, 
"integer") .
 
  191            " WHERE layout_id =" . 
$ilDB->quote($this->layout_id, 
"integer");
 
  202        $query = 
"SELECT * FROM page_layout WHERE layout_id =" . 
$ilDB->quote($this->layout_id, 
"integer");
 
  205        $this->title = 
$row[
'title'];
 
  208        $this->description = 
$row[
'description'];
 
  209        $this->active = 
$row[
'active'];
 
  212        if (
$row[
"mod_scorm"]) {
 
  215        if (
$row[
"mod_portfolio"]) {
 
  228        include_once 
"Services/COPage/Layout/classes/class.ilPageLayoutPage.php";
 
  230        return $layout_page->getXMLContent();
 
  245        return "./Services/COPage/Layout/xml/layout2html.xsl";
 
  254        $path = 
"////PlaceHolder";
 
  257        foreach (
$res->nodeset as $item) {
 
  258            $height = $item->get_attribute(
"Height");
 
  260            $height = str_ireplace(
"px", 
"", $height);
 
  261            $height = $height / 10;
 
  262            $item->set_attribute(
"Height", $height . 
"px");
 
  264        $xsl = file_get_contents($this->
getXSLPath());
 
  266        $xml = $dom->dump_mem(0, 
"UTF-8");
 
  268        $args = array( 
'/_xml' => 
$xml, 
'/_xsl' => $xsl );
 
  271        $output = xslt_process($xh, 
"arg:/_xml", 
"arg:/_xsl", 
null, $args, 
null);
 
  287        $arr_layouts = array();
 
  289            $add = 
"WHERE (active=1)";
 
  291        $query = 
"SELECT * FROM page_layout $add ORDER BY title ";
 
  294            array_push($arr_layouts, 
$row);
 
  302    public static function getLayouts($a_active = 
false, $a_special_page = 
false, $a_module = 
null)
 
  307        $arr_layouts = array();
 
  308        $add = 
"WHERE special_page = " . 
$ilDB->quote($a_special_page, 
"integer");
 
  310            $add .= 
" AND (active = 1)";
 
  314                $add .= 
" AND mod_scorm = 1";
 
  318                $add .= 
" AND mod_portfolio = 1";
 
  321        $query = 
"SELECT layout_id FROM page_layout $add ORDER BY title ";
 
  333    public static function activeLayouts($a_special_page = 
false, $a_module = 
null)
 
  346    public static function import($a_filename, $a_filepath)
 
  348        include_once(
"./Services/Export/classes/class.ilImport.php");
 
  365            self::MODULE_SCORM => 
$lng->txt(
"style_page_layout_module_scorm"),
 
  366            self::MODULE_PORTFOLIO => 
$lng->txt(
"style_page_layout_module_portfolio")
 
An exception for terminatinating execution or to throw for unit testing.
readObject()
Read page layout.
setSpecialPage($a_val)
Set special page.
setModules(array $a_values=null)
Set modules.
getStyleId()
Get style id.
setDescription($a_description)
getSpecialPage()
Get special page.
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
setStyleId($a_val)
Set style id.
update()
Update page layout.
static getAvailableModules()
activate($a_setting=true)
(De-)Activate layout
getXMLContent()
Get xml content.
static getLayouts($a_active=false, $a_special_page=false, $a_module=null)
Get layouts.
static getLayoutsAsArray($a_active=0)
Static access functions.
xpath_eval($xpath_context, $eval_str, $contextnode=null)
domxml_open_mem($str, $mode=0, &$error=null)
xpath_new_context($dom_document)
const DOMXML_LOAD_PARSING
foreach($_POST as $key=> $value) $res