4 require_once(
"./Services/COPage/classes/class.ilPageContent.php");
 
   46                 $this->mob_node =& $a_node->first_child();
 
   62                 $this->hier_id = $a_hier_id;
 
   72                 $this->mediaobject = $a_mediaobject;
 
   82                 return $this->mediaobject;
 
   93         function create(&$a_pg_obj, $a_hier_id)
 
  106                 $this->node =& $this->dom->create_element(
"PageContent");
 
  107                 $a_pg_obj->insertContent($this, $a_hier_id, 
IL_INSERT_AFTER, $a_pc_id);
 
  108                 $this->mob_node =& $this->dom->create_element(
"MediaObject");
 
  109                 $this->mob_node =& $this->node->append_child($this->mob_node);
 
  110                 $this->mal_node =& $this->dom->create_element(
"MediaAlias");
 
  111                 $this->mal_node =& $this->mob_node->append_child($this->mal_node);
 
  112                 $this->mal_node->set_attribute(
"OriginId", 
"il__mob_".$this->
getMediaObject()->getId());
 
  115                 $item_node =& $this->dom->create_element(
"MediaAliasItem");
 
  116                 $item_node =& $this->mob_node->append_child($item_node);
 
  117                 $item_node->set_attribute(
"Purpose", 
"Standard");
 
  120                 $layout_node =& $this->dom->create_element(
"Layout");
 
  121                 $layout_node =& $item_node->append_child($layout_node);
 
  122                 if ($media_item->getWidth() > 0)
 
  126                 if ($media_item->getHeight() > 0)
 
  130                 $layout_node->set_attribute(
"HorizontalAlign", 
"Left");
 
  133                 if ($media_item->getCaption() != 
"")
 
  135                         $cap_node =& $this->dom->create_element(
"Caption");
 
  136                         $cap_node =& $item_node->append_child($cap_node);
 
  137                         $cap_node->set_attribute(
"Align", 
"bottom");
 
  138                         $cap_node->set_content($media_item->getCaption());
 
  142                 if ($media_item->getTextRepresentation() != 
"")
 
  144                         $tr_node =& $this->dom->create_element(
"TextRepresentation");
 
  145                         $tr_node =& $item_node->append_child($tr_node);
 
  146                         $tr_node->set_content($media_item->getTextRepresentation());
 
  149                 $pars = $media_item->getParameters();
 
  150                 foreach($pars as $par => $val)
 
  152                         $par_node =& $this->dom->create_element(
"Parameter");
 
  153                         $par_node =& $item_node->append_child($par_node);
 
  154                         $par_node->set_attribute(
"Name", $par);
 
  155                         $par_node->set_attribute(
"Value", $val);
 
  159                 $fullscreen_item =& $this->
getMediaObject()->getMediaItem(
"Fullscreen");
 
  160                 if (is_object($fullscreen_item))
 
  162                         $item_node =& $this->dom->create_element(
"MediaAliasItem");
 
  163                         $item_node =& $this->mob_node->append_child($item_node);
 
  164                         $item_node->set_attribute(
"Purpose", 
"Fullscreen");
 
  167                         $layout_node =& $this->dom->create_element(
"Layout");
 
  168                         $layout_node =& $item_node->append_child($layout_node);
 
  169                         if ($fullscreen_item->getWidth() > 0)
 
  171                                 $layout_node->set_attribute(
"Width", $fullscreen_item->getWidth());
 
  173                         if ($fullscreen_item->getHeight() > 0)
 
  175                                 $layout_node->set_attribute(
"Height", $fullscreen_item->getHeight());
 
  179                         if ($fullscreen_item->getCaption() != 
"")
 
  181                                 $cap_node =& $this->dom->create_element(
"Caption");
 
  182                                 $cap_node =& $item_node->append_child($cap_node);
 
  183                                 $cap_node->set_attribute(
"Align", 
"bottom");
 
  184                                 $cap_node->set_content($fullscreen_item->getCaption());
 
  188                         if ($fullscreen_item->getTextRepresentation() != 
"")
 
  190                                 $tr_node =& $this->dom->create_element(
"TextRepresentation");
 
  191                                 $tr_node =& $item_node->append_child($tr_node);
 
  192                                 $tr_node->set_content($fullscreen_item->getTextRepresentation());
 
  195                         $pars = $fullscreen_item->getParameters();
 
  196                         foreach($pars as $par => $val)
 
  198                                 $par_node =& $this->dom->create_element(
"Parameter");
 
  199                                 $par_node =& $item_node->append_child($par_node);
 
  200                                 $par_node->set_attribute(
"Name", $par);
 
  201                                 $par_node->set_attribute(
"Value", $val);
 
  213                 if (is_object($this->mob_node))
 
  215                         $this->mal_node =& $this->mob_node->first_child();
 
  216                         if (is_object($this->mal_node) && $this->mal_node->node_name() == 
"MediaAlias")
 
  218                                 $this->mal_node->set_attribute(
"OriginId", 
"il__mob_".$this->
getMediaObject()->getId());
 
  228                 $xml = $this->dom->dump_node($this->node);
 
  239                 if (is_object($this->mob_node))
 
  241                         $mal_node = $this->mob_node->first_child();
 
  242                         if (is_object($mal_node))
 
  244                                 if (!empty($a_class))
 
  246                                         $mal_node->set_attribute(
"Class", $a_class);
 
  250                                         if ($mal_node->has_attribute(
"Class"))
 
  252                                                 $mal_node->remove_attribute(
"Class");
 
  266                 if (is_object($this->mob_node))
 
  268                         $mal_node = $this->mob_node->first_child();
 
  269                         if (is_object($mal_node))
 
  271                                 $class =  $mal_node->get_attribute(
"Class");