22    const SEQ_TEMPLATE_DIR = 
'./Modules/Scorm2004/templates/editor/page_layouts_temp/thumbnails';
 
   38        $this->db = 
$DIC->database();
 
   42            $this->layout_id = 
$ilDB->nextId(
"page_layout");
 
   43            $ilDB->insert(
"page_layout", array(
 
   44                "layout_id" => array(
"integer", $this->layout_id),
 
   45                "active" => array(
"integer", 0),
 
   46                "title" => array(
"text", 
""),
 
   47                "content" => array(
"clob", 
""),
 
   48                "description" => array(
"text", 
"")
 
   56            $this->active = 
false;
 
   58            $this->layout_id = $a_id;
 
   74        $this->description = $a_description;
 
   84        $this->title = $a_title;
 
   97        $this->style_id = $a_val;
 
  105        return $this->style_id;
 
  113        $this->special_page = $a_val;
 
  121        return $this->special_page;
 
  131            $this->modules = array_intersect($a_values, 
$valid);
 
  133            $this->modules = array();
 
  154        $query = 
"UPDATE page_layout SET active=" . 
$ilDB->quote($a_setting, 
"integer") .
 
  155            " WHERE layout_id =" . 
$ilDB->quote($this->layout_id, 
"integer");
 
  162    public function delete()
 
  166        $query = 
"DELETE FROM page_layout WHERE layout_id =" . 
$ilDB->quote($this->layout_id, 
"integer");
 
  177        $mod_scorm = $mod_portfolio = $mod_lm = 0;
 
  178        if (in_array(self::MODULE_SCORM, $this->modules)) {
 
  181        if (in_array(self::MODULE_PORTFOLIO, $this->modules)) {
 
  184        if (in_array(self::MODULE_LM, $this->modules)) {
 
  188        $query = 
"UPDATE page_layout SET title=" . 
$ilDB->quote($this->title, 
"text") .
 
  189            ",description =" . 
$ilDB->quote($this->description, 
"text") .
 
  190            ",active =" . 
$ilDB->quote($this->active, 
"integer") .
 
  193            ",mod_scorm =" . 
$ilDB->quote($mod_scorm, 
"integer") .
 
  194            ",mod_portfolio =" . 
$ilDB->quote($mod_portfolio, 
"integer") .
 
  195            ",mod_lm =" . 
$ilDB->quote($mod_lm, 
"integer") .
 
  196            " WHERE layout_id =" . 
$ilDB->quote($this->layout_id, 
"integer");
 
  207        $query = 
"SELECT * FROM page_layout WHERE layout_id =" . 
$ilDB->quote($this->layout_id, 
"integer");
 
  210        $this->title = $row[
'title'];
 
  213        $this->description = $row[
'description'];
 
  214        $this->active = $row[
'active'];
 
  217        if ($row[
"mod_scorm"]) {
 
  220        if ($row[
"mod_portfolio"]) {
 
  223        if ($row[
"mod_lm"]) {
 
  236        include_once 
"Services/COPage/Layout/classes/class.ilPageLayoutPage.php";
 
  238        return $layout_page->getXMLContent();
 
  253        return "./Services/COPage/Layout/xml/layout2html.xsl";
 
  262        $path = 
"////PlaceHolder";
 
  265        foreach (
$res->nodeset as $item) {
 
  266            $height = $item->get_attribute(
"Height");
 
  268            $height = str_ireplace(
"px", 
"", $height);
 
  269            $height = $height / 10;
 
  270            $item->set_attribute(
"Height", $height . 
"px");
 
  272        $xsl = file_get_contents($this->
getXSLPath());
 
  274        $xml = $dom->dump_mem(0, 
"UTF-8");
 
  276        $args = array( 
'/_xml' => 
$xml, 
'/_xsl' => $xsl );
 
  279        $output = xslt_process($xh, 
"arg:/_xml", 
"arg:/_xsl", 
null, $args, 
null);
 
  295        $arr_layouts = array();
 
  297            $add = 
"WHERE (active=1)";
 
  299        $query = 
"SELECT * FROM page_layout $add ORDER BY title ";
 
  302            array_push($arr_layouts, $row);
 
  310    public static function getLayouts($a_active = 
false, $a_special_page = 
false, $a_module = 
null)
 
  315        $arr_layouts = array();
 
  316        $add = 
"WHERE special_page = " . 
$ilDB->quote($a_special_page, 
"integer");
 
  318            $add .= 
" AND (active = 1)";
 
  322                $add .= 
" AND mod_scorm = 1";
 
  326                $add .= 
" AND mod_portfolio = 1";
 
  330                $add .= 
" AND mod_lm = 1";
 
  333        $query = 
"SELECT layout_id FROM page_layout $add ORDER BY title ";
 
  336            array_push($arr_layouts, 
new ilPageLayout($row[
'layout_id']));
 
  345    public static function activeLayouts($a_special_page = 
false, $a_module = 
null)
 
  358    public static function import($a_filename, $a_filepath)
 
  360        include_once(
"./Services/Export/classes/class.ilImport.php");
 
  377            self::MODULE_SCORM => 
$lng->txt(
"style_page_layout_module_scorm"),
 
  378            self::MODULE_PORTFOLIO => 
$lng->txt(
"style_page_layout_module_portfolio"),
 
  379            self::MODULE_LM => 
$lng->txt(
"style_page_layout_module_learning_module")
 
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