ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilPCMediaObject Class Reference

Class ilPCMediaObject. More...

+ Inheritance diagram for ilPCMediaObject:
+ Collaboration diagram for ilPCMediaObject:

Public Member Functions

 init ()
 Init page content component. More...
 
 readMediaObject ($a_mob_id=0)
 Read/get Media Object. More...
 
 setNode ($a_node)
 Set xml node of page content. More...
 
 setDom (&$a_dom)
 set dom object More...
 
 setHierId ($a_hier_id)
 set hierarchical edit id More...
 
 setMediaObject ($a_mediaobject)
 Set Media Object. More...
 
 getMediaObject ()
 Get Media Object. More...
 
 createMediaObject ()
 
 create (&$a_pg_obj, $a_hier_id)
 Create pc media object. More...
 
 createAlias (&$a_pg_obj, $a_hier_id, $a_pc_id="")
 Create an media alias in page. More...
 
 updateObjectReference ()
 Updates the media object referenced by the media alias. More...
 
 dumpXML ()
 Dump node xml. More...
 
 setClass ($a_class)
 Set Style Class of table. More...
 
 getClass ()
 Get characteristic of section. More...
 
 modifyPageContentPostXsl ($a_html, $a_mode, $a_abstract_only=false)
 @inheritDoc More...
 
 getJavascriptFiles ($a_mode)
 @inheritDoc More...
 
 getCssFiles ($a_mode)
 @inheritDoc More...
 
- Public Member Functions inherited from ilPageContent
 __construct ($a_pg_obj)
 Constructor. More...
 
 setPage ($a_val)
 Set page. More...
 
 getPage ()
 Get page. More...
 
 init ()
 Init object. More...
 
 getType ()
 Get type of page content. More...
 
 setNode ($a_node)
 Set xml node of page content. More...
 
getNode ()
 Get xml node of page content. More...
 
 getJavascriptFiles ($a_mode)
 Get Javascript files. More...
 
 getCssFiles ($a_mode)
 Get css files. More...
 
 getOnloadCode ($a_mode)
 Get on load code. More...
 
 setHierId ($a_hier_id)
 Set hierarchical ID in xml structure. More...
 
 getHierId ()
 Get hierarchical id. More...
 
 lookupHierId ()
 Get hierarchical id from dom. More...
 
 readHierId ()
 Read PC Id. More...
 
 setPcId ($a_pcid)
 Set PC Id. More...
 
 getPCId ()
 Get PC Id. More...
 
 setFileDownloadLink ($a_download_link)
 Set file download link. More...
 
 getFileDownloadLink ()
 Get file download link. More...
 
 setProfileBackUrl ($url)
 
 getProfileBackUrl ()
 
 setFullscreenLink ($a_fullscreen_link)
 Set fullscreen link. More...
 
 getFullscreenLink ()
 Get fullscreen link. More...
 
 setSourcecodeDownloadScript ($script_name)
 Set sourcecode download script. More...
 
 getSourcecodeDownloadScript ()
 Get sourcecode download script. More...
 
 readPCId ()
 Read PC Id. More...
 
 writePCId ($a_pc_id)
 Write pc id. More...
 
 setEnabled ($value)
 Set Enabled value for page content component. More...
 
 enable ()
 Enable page content. More...
 
 disable ()
 Disable page content. More...
 
 isEnabled ()
 Check whether page content is enabled. More...
 
 createPageContentNode ($a_set_this_node=true)
 Create page content node (always use this method first when adding a new element) More...
 
 modifyPageContentPostXsl ($a_output, $a_mode, $a_abstract_only=false)
 Modify page content after xsl. More...
 

Static Public Member Functions

static getLangVars ()
 Get lang vars needed for editing. More...
 
static afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete ($a_page)
 Before page is being deleted. More...
 
static afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
 After page history entry has been created. More...
 
static saveMobUsage ($a_page, $a_domdoc, $a_old_nr=0)
 Save all usages of media objects (media aliases, media objects, internal links) More...
 
- Static Public Member Functions inherited from ilPageContent
static incEdId ($ed_id)
 Increases an hierarchical editing id at lowest level (last number) More...
 
static decEdId ($ed_id)
 Decreases an hierarchical editing id at lowest level (last number) More...
 
static haveSameContainer ($ed_id1, $ed_id2)
 Check, if two ids are in same container. More...
 
static sortHierIds ($a_array)
 Sort an array of Hier IDS in ascending order. More...
 
static isGreaterHierId ($a, $b)
 Check whether Hier ID $a is greater than Hier ID $b. More...
 
static getLangVars ()
 Get lang vars needed for editing. More...
 
static handleCopiedContent (DOMDocument $a_domdoc, $a_self_ass=true, $a_clone_mobs=false)
 Handle copied content. More...
 
static afterPageUpdate ($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
 After page has been updated (or created) More...
 
static beforePageDelete ($a_page)
 Before page is being deleted. More...
 
static afterPageHistoryEntry ($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
 After page history entry has been created. More...
 

Protected Attributes

 $user
 
 $mob_node
 
 $ui
 
 $lng
 
- Protected Attributes inherited from ilPageContent
 $profile_back_url
 
 $file_download_link
 
 $fullscreen_link
 
 $sourcecode_download_script
 
 $log
 

Additional Inherited Members

- Data Fields inherited from ilPageContent
 $hier_id
 
 $node
 
 $dom
 
 $page_lang
 
- Protected Member Functions inherited from ilPageContent
 setType ($a_type)
 Set Type. More...
 

Detailed Description

Class ilPCMediaObject.

Media content object (see ILIAS DTD)

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 16 of file class.ilPCMediaObject.php.

Member Function Documentation

◆ afterPageHistoryEntry()

static ilPCMediaObject::afterPageHistoryEntry (   $a_page,
DOMDocument  $a_old_domdoc,
  $a_old_xml,
  $a_old_nr 
)
static

After page history entry has been created.

Parameters
object$a_pagepage object
DOMDocument$a_old_domdocold dom document
string$a_old_xmlold xml
integer$a_old_nrhistory number

Reimplemented from ilPageContent.

Definition at line 355 of file class.ilPCMediaObject.php.

356 {
357 self::saveMobUsage($a_page, $a_old_domdoc, $a_old_nr);
358 }
static saveMobUsage($a_page, $a_domdoc, $a_old_nr=0)
Save all usages of media objects (media aliases, media objects, internal links)

References saveMobUsage().

+ Here is the call graph for this function:

◆ afterPageUpdate()

static ilPCMediaObject::afterPageUpdate (   $a_page,
DOMDocument  $a_domdoc,
  $a_xml,
  $a_creation 
)
static

After page has been updated (or created)

Parameters
object$a_pagepage object
DOMDocument$a_domdocdom document
string$a_xmlxml
bool$a_creationtrue on creation, otherwise false

Reimplemented from ilPageContent.

Definition at line 291 of file class.ilPCMediaObject.php.

292 {
293 if (!$a_page->getImportMode()) {
294 include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
296 $a_page->getParentType() . ":pg",
297 $a_page->getId(),
298 0,
299 $a_page->getLanguage()
300 );
301 self::saveMobUsage($a_page, $a_domdoc);
302 foreach ($mob_ids as $mob) { // check, whether media object can be deleted
303 if (ilObject::_exists($mob) && ilObject::_lookupType($mob) == "mob") {
304 $mob_obj = new ilObjMediaObject($mob);
305 $usages = $mob_obj->getUsages(false);
306 if (count($usages) == 0) { // delete, if no usage exists
307 $mob_obj->delete();
308 }
309 }
310 }
311 }
312 }
Class ilObjMediaObject.
static _getMobsOfObject($a_type, $a_id, $a_usage_hist_nr=0, $a_lang="-")
get mobs of object
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _lookupType($a_id, $a_reference=false)
lookup object type

References ilObject\_exists(), ilObjMediaObject\_getMobsOfObject(), ilObject\_lookupType(), and saveMobUsage().

+ Here is the call graph for this function:

◆ beforePageDelete()

static ilPCMediaObject::beforePageDelete (   $a_page)
static

Before page is being deleted.

Parameters
object$a_pagepage object

Reimplemented from ilPageContent.

Definition at line 319 of file class.ilPCMediaObject.php.

320 {
321 include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
323 $a_page->getParentType() . ":pg",
324 $a_page->getId(),
325 0,
326 $a_page->getLanguage()
327 );
328
330 $a_page->getParentType() . ":pg",
331 $a_page->getId(),
332 false,
333 $a_page->getLanguage()
334 );
335
336 foreach ($mob_ids as $mob) { // check, whether media object can be deleted
337 if (ilObject::_exists($mob) && ilObject::_lookupType($mob) == "mob") {
338 $mob_obj = new ilObjMediaObject($mob);
339 $usages = $mob_obj->getUsages(false);
340 if (count($usages) == 0) { // delete, if no usage exists
341 $mob_obj->delete();
342 }
343 }
344 }
345 }
static _deleteAllUsages($a_type, $a_id, $a_usage_hist_nr=0, $a_lang="-")
static

References ilObjMediaObject\_deleteAllUsages(), ilObject\_exists(), ilObjMediaObject\_getMobsOfObject(), and ilObject\_lookupType().

+ Here is the call graph for this function:

◆ create()

ilPCMediaObject::create ( $a_pg_obj,
  $a_hier_id 
)

Create pc media object.

Definition at line 111 of file class.ilPCMediaObject.php.

112 {
113 $this->node = $this->createPageContentNode();
114 }
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element)

References ilPageContent\createPageContentNode().

+ Here is the call graph for this function:

◆ createAlias()

ilPCMediaObject::createAlias ( $a_pg_obj,
  $a_hier_id,
  $a_pc_id = "" 
)

Create an media alias in page.

Parameters
object$a_pg_objpage object
string$a_hier_idhierarchical ID w

Definition at line 122 of file class.ilPCMediaObject.php.

123 {
124 $this->node = $this->dom->create_element("PageContent");
125 $a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);
126 $this->mob_node = $this->dom->create_element("MediaObject");
127 $this->mob_node = $this->node->append_child($this->mob_node);
128 $this->mal_node = $this->dom->create_element("MediaAlias");
129 $this->mal_node = $this->mob_node->append_child($this->mal_node);
130 $this->mal_node->set_attribute("OriginId", "il__mob_" . $this->getMediaObject()->getId());
131
132 // standard view
133 $item_node = $this->dom->create_element("MediaAliasItem");
134 $item_node = $this->mob_node->append_child($item_node);
135 $item_node->set_attribute("Purpose", "Standard");
136 $media_item = $this->getMediaObject()->getMediaItem("Standard");
137
138 $layout_node = $this->dom->create_element("Layout");
139 $layout_node = $item_node->append_child($layout_node);
140 if ($media_item->getWidth() > 0) {
141 //$layout_node->set_attribute("Width", $media_item->getWidth());
142 }
143 if ($media_item->getHeight() > 0) {
144 //$layout_node->set_attribute("Height", $media_item->getHeight());
145 }
146 $layout_node->set_attribute("HorizontalAlign", "Left");
147
148 // caption
149 if ($media_item->getCaption() != "") {
150 $cap_node = $this->dom->create_element("Caption");
151 $cap_node = $item_node->append_child($cap_node);
152 $cap_node->set_attribute("Align", "bottom");
153 $cap_node->set_content($media_item->getCaption());
154 }
155
156 // text representation
157 if ($media_item->getTextRepresentation() != "") {
158 $tr_node = $this->dom->create_element("TextRepresentation");
159 $tr_node = $item_node->append_child($tr_node);
160 $tr_node->set_content($media_item->getTextRepresentation());
161 }
162
163 $pars = $media_item->getParameters();
164 foreach ($pars as $par => $val) {
165 $par_node = $this->dom->create_element("Parameter");
166 $par_node = $item_node->append_child($par_node);
167 $par_node->set_attribute("Name", $par);
168 $par_node->set_attribute("Value", $val);
169 }
170
171 // fullscreen view
172 $fullscreen_item = $this->getMediaObject()->getMediaItem("Fullscreen");
173 if (is_object($fullscreen_item)) {
174 $item_node = $this->dom->create_element("MediaAliasItem");
175 $item_node = $this->mob_node->append_child($item_node);
176 $item_node->set_attribute("Purpose", "Fullscreen");
177
178 // width and height
179 $layout_node = $this->dom->create_element("Layout");
180 $layout_node = $item_node->append_child($layout_node);
181 if ($fullscreen_item->getWidth() > 0) {
182 $layout_node->set_attribute("Width", $fullscreen_item->getWidth());
183 }
184 if ($fullscreen_item->getHeight() > 0) {
185 $layout_node->set_attribute("Height", $fullscreen_item->getHeight());
186 }
187
188 // caption
189 if ($fullscreen_item->getCaption() != "") {
190 $cap_node = $this->dom->create_element("Caption");
191 $cap_node = $item_node->append_child($cap_node);
192 $cap_node->set_attribute("Align", "bottom");
193 $cap_node->set_content($fullscreen_item->getCaption());
194 }
195
196 // text representation
197 if ($fullscreen_item->getTextRepresentation() != "") {
198 $tr_node = $this->dom->create_element("TextRepresentation");
199 $tr_node = $item_node->append_child($tr_node);
200 $tr_node->set_content($fullscreen_item->getTextRepresentation());
201 }
202
203 $pars = $fullscreen_item->getParameters();
204 foreach ($pars as $par => $val) {
205 $par_node = $this->dom->create_element("Parameter");
206 $par_node = $item_node->append_child($par_node);
207 $par_node->set_attribute("Name", $par);
208 $par_node->set_attribute("Value", $val);
209 }
210 }
211 }
const IL_INSERT_AFTER
getMediaObject()
Get Media Object.

References getMediaObject(), and IL_INSERT_AFTER.

+ Here is the call graph for this function:

◆ createMediaObject()

ilPCMediaObject::createMediaObject ( )

Definition at line 103 of file class.ilPCMediaObject.php.

104 {
105 $this->setMediaObject(new ilObjMediaObject());
106 }
setMediaObject($a_mediaobject)
Set Media Object.

References setMediaObject().

+ Here is the call graph for this function:

◆ dumpXML()

ilPCMediaObject::dumpXML ( )

Dump node xml.

Definition at line 231 of file class.ilPCMediaObject.php.

232 {
233 $xml = $this->dom->dump_node($this->node);
234 return $xml;
235 }
$xml
Definition: metadata.php:332

References $xml.

◆ getClass()

ilPCMediaObject::getClass ( )

Get characteristic of section.

Returns
string characteristic

Definition at line 263 of file class.ilPCMediaObject.php.

264 {
265 if (is_object($this->mob_node)) {
266 $mal_node = $this->mob_node->first_child();
267 if (is_object($mal_node)) {
268 $class = $mal_node->get_attribute("Class");
269 return $class;
270 }
271 }
272 }

◆ getCssFiles()

ilPCMediaObject::getCssFiles (   $a_mode)

@inheritDoc

Reimplemented from ilPageContent.

Definition at line 488 of file class.ilPCMediaObject.php.

489 {
490 $js_files = ilPlayerUtil::getCssFilePaths();
491
492 return $js_files;
493 }
static getCssFilePaths()
Get css file paths.

References ilPlayerUtil\getCssFilePaths().

+ Here is the call graph for this function:

◆ getJavascriptFiles()

ilPCMediaObject::getJavascriptFiles (   $a_mode)

@inheritDoc

Reimplemented from ilPageContent.

Definition at line 478 of file class.ilPCMediaObject.php.

479 {
480 $js_files = ilPlayerUtil::getJsFilePaths();
482 return $js_files;
483 }
static getJsFilePaths()
Get js file paths.
static getLocalMaphilightPath()
Get local path of maphilight file.

References ilPlayerUtil\getJsFilePaths(), and iljQueryUtil\getLocalMaphilightPath().

+ Here is the call graph for this function:

◆ getLangVars()

static ilPCMediaObject::getLangVars ( )
static

Get lang vars needed for editing.

Returns
array array of lang var keys

Reimplemented from ilPageContent.

Definition at line 278 of file class.ilPCMediaObject.php.

279 {
280 return array("pc_mob");
281 }

◆ getMediaObject()

ilPCMediaObject::getMediaObject ( )

Get Media Object.

Returns
object Media Object

Definition at line 98 of file class.ilPCMediaObject.php.

99 {
100 return $this->mediaobject;
101 }

Referenced by createAlias(), and updateObjectReference().

+ Here is the caller graph for this function:

◆ init()

ilPCMediaObject::init ( )

Init page content component.

Reimplemented from ilPageContent.

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

39 {
40 global $DIC;
41
42 $this->user = $DIC->user();
43 $this->setType("media");
44 $this->ui = $DIC->ui();
45 $this->lng = $DIC->language();
46 }
user()
Definition: user.php:4
setType($a_type)
Set Type.
ui()
Definition: ui.php:5
$DIC
Definition: xapitoken.php:46

References $DIC, ilPageContent\setType(), ui(), and user().

+ Here is the call graph for this function:

◆ modifyPageContentPostXsl()

ilPCMediaObject::modifyPageContentPostXsl (   $a_html,
  $a_mode,
  $a_abstract_only = false 
)

@inheritDoc

Reimplemented from ilPageContent.

Definition at line 433 of file class.ilPCMediaObject.php.

434 {
436
437 if ($a_mode == "offline") {
438 $page = $this->getPage();
439
441 $page->getParentType() . ":pg",
442 $page->getId(),
443 0,
444 $page->getLanguage()
445 );
446 foreach ($mob_ids as $mob_id) {
447 $mob = new ilObjMediaObject($mob_id);
448 $srts = $mob->getSrtFiles();
449 foreach ($srts as $srt) {
450 if ($ilUser->getLanguage() == $srt["language"]) {
451 $srt_content = file_get_contents(ilObjMediaObject::_getDirectory($mob->getId()) . "/" . $srt["full_path"]);
452 $a_html = str_replace("[[[[[mobsubtitle;il__mob_" . $mob->getId() . "_Standard]]]]]", $srt_content, $a_html);
453 }
454 }
455 }
456 }
457
458 if ($a_abstract_only) {
459 return $a_html;
460 }
461
462 // add fullscreen modals
463 $page = $this->getPage();
464 $suffix = "-".$page->getParentType()."-".$page->getId();
465 $modal = $this->ui->factory()->modal()->roundtrip(
466 $this->lng->txt("cont_fullscreen"),
467 $this->ui->factory()->legacy("<iframe class='il-copg-mob-fullscreen' id='il-copg-mob-fullscreen".$suffix."'></iframe>")
468 );
469 $show_signal = $modal->getShowSignal();
470
471 return $a_html . "<div class='il-copg-mob-fullscreen-modal'>" . $this->ui->renderer()->render($modal) . "</div><script>$(function () { il.COPagePres.setFullscreenModalShowSignal('" .
472 $show_signal . "', '".$suffix."'); });</script>";
473 }
static _getDirectory($a_mob_id)
Get absolute directory.
$ilUser
Definition: imgupload.php:18

References $ilUser, $user, ilObjMediaObject\_getDirectory(), ilObjMediaObject\_getMobsOfObject(), ilPageContent\getPage(), and ui().

+ Here is the call graph for this function:

◆ readMediaObject()

ilPCMediaObject::readMediaObject (   $a_mob_id = 0)

Read/get Media Object.

Parameters
intmedia object ID

Definition at line 53 of file class.ilPCMediaObject.php.

54 {
55 if ($a_mob_id > 0) {
56 $mob = new ilObjMediaObject($a_mob_id);
57 $this->setMediaObject($mob);
58 }
59 }

References setMediaObject().

+ Here is the call graph for this function:

◆ saveMobUsage()

static ilPCMediaObject::saveMobUsage (   $a_page,
  $a_domdoc,
  $a_old_nr = 0 
)
static

Save all usages of media objects (media aliases, media objects, internal links)

Parameters
string$a_xmlxml data of page

Definition at line 365 of file class.ilPCMediaObject.php.

366 {
367 $usages = array();
368
369 // media aliases
370 $xpath = new DOMXPath($a_domdoc);
371 $nodes = $xpath->query('//MediaAlias');
372 foreach ($nodes as $node) {
373 $id_arr = explode("_", $node->getAttribute("OriginId"));
374 $mob_id = $id_arr[count($id_arr) - 1];
375 if ($mob_id > 0 && $id_arr[1] == "") {
376 $usages[$mob_id] = true;
377 }
378 }
379
380 // media objects
381 $xpath = new DOMXPath($a_domdoc);
382 $nodes = $xpath->query('//MediaObject/MetaData/General/Identifier');
383 foreach ($nodes as $node) {
384 $mob_entry = $node->getAttribute("Entry");
385 $mob_arr = explode("_", $mob_entry);
386 $mob_id = $mob_arr[count($mob_arr) - 1];
387 if ($mob_id > 0 && $mob_arr[1] == "") {
388 $usages[$mob_id] = true;
389 }
390 }
391
392 // internal links
393 $xpath = new DOMXPath($a_domdoc);
394 $nodes = $xpath->query("//IntLink[@Type='MediaObject']");
395 foreach ($nodes as $node) {
396 $mob_target = $node->getAttribute("Target");
397 $mob_arr = explode("_", $mob_target);
398 //echo "<br>3<br>";
399 //echo $mob_target."<br>";
400 //var_dump($mob_arr);
401 $mob_id = $mob_arr[count($mob_arr) - 1];
402 if ($mob_id > 0 && $mob_arr[1] == "") {
403 $usages[$mob_id] = true;
404 }
405 }
406
407 include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
409 $a_page->getParentType() . ":pg",
410 $a_page->getId(),
411 $a_old_nr,
412 $a_page->getLanguage()
413 );
414 foreach ($usages as $mob_id => $val) {
415 // save usage, if object exists...
416 if (ilObject::_lookupType($mob_id) == "mob") {
418 $mob_id,
419 $a_page->getParentType() . ":pg",
420 $a_page->getId(),
421 $a_old_nr,
422 $a_page->getLanguage()
423 );
424 }
425 }
426
427 return $usages;
428 }
static _saveUsage($a_mob_id, $a_type, $a_id, $a_usage_hist_nr=0, $a_lang="-")
Save usage of mob within another container (e.g.

References ilPageContent\$node, ilObjMediaObject\_deleteAllUsages(), ilObject\_lookupType(), and ilObjMediaObject\_saveUsage().

Referenced by afterPageHistoryEntry(), and afterPageUpdate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setClass()

ilPCMediaObject::setClass (   $a_class)

Set Style Class of table.

Parameters
string$a_classclass

Definition at line 242 of file class.ilPCMediaObject.php.

243 {
244 if (is_object($this->mob_node)) {
245 $mal_node = $this->mob_node->first_child();
246 if (is_object($mal_node)) {
247 if (!empty($a_class)) {
248 $mal_node->set_attribute("Class", $a_class);
249 } else {
250 if ($mal_node->has_attribute("Class")) {
251 $mal_node->remove_attribute("Class");
252 }
253 }
254 }
255 }
256 }

◆ setDom()

ilPCMediaObject::setDom ( $a_dom)

set dom object

Definition at line 70 of file class.ilPCMediaObject.php.

71 {
72 $this->dom = $a_dom;
73 }

◆ setHierId()

ilPCMediaObject::setHierId (   $a_hier_id)

set hierarchical edit id

Reimplemented from ilPageContent.

Definition at line 78 of file class.ilPCMediaObject.php.

79 {
80 $this->hier_id = $a_hier_id;
81 }

◆ setMediaObject()

ilPCMediaObject::setMediaObject (   $a_mediaobject)

Set Media Object.

Parameters
object$a_mediaobjectMedia Object

Definition at line 88 of file class.ilPCMediaObject.php.

89 {
90 $this->mediaobject = $a_mediaobject;
91 }

Referenced by createMediaObject(), and readMediaObject().

+ Here is the caller graph for this function:

◆ setNode()

ilPCMediaObject::setNode (   $a_node)

Set xml node of page content.

Parameters
object$a_nodenode object

Reimplemented from ilPageContent.

Definition at line 61 of file class.ilPCMediaObject.php.

62 {
63 parent::setNode($a_node); // this is the PageContent node
64 $this->mob_node = $a_node->first_child();
65 }

◆ updateObjectReference()

ilPCMediaObject::updateObjectReference ( )

Updates the media object referenced by the media alias.

This makes only sense, after the media object has changed. (-> change object reference function)

Definition at line 218 of file class.ilPCMediaObject.php.

219 {
220 if (is_object($this->mob_node)) {
221 $this->mal_node = $this->mob_node->first_child();
222 if (is_object($this->mal_node) && $this->mal_node->node_name() == "MediaAlias") {
223 $this->mal_node->set_attribute("OriginId", "il__mob_" . $this->getMediaObject()->getId());
224 }
225 }
226 }

References getMediaObject().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilPCMediaObject::$lng
protected

Definition at line 33 of file class.ilPCMediaObject.php.

◆ $mob_node

ilPCMediaObject::$mob_node
protected

Definition at line 23 of file class.ilPCMediaObject.php.

◆ $ui

ilPCMediaObject::$ui
protected

Definition at line 28 of file class.ilPCMediaObject.php.

◆ $user

ilPCMediaObject::$user
protected

Definition at line 21 of file class.ilPCMediaObject.php.

Referenced by modifyPageContentPostXsl().


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