19 declare(strict_types=1);
    33         $this->dom_util = $DIC->copage()->internal()->domain()->domUtil();
    42         bool $a_inline_only = 
true    45         $path = 
"//MediaObject/MediaAlias";
    47         $nodes = $this->dom_util->path($dom, 
$path);
    48         foreach ($nodes as $node) {
    49             $id_arr = explode(
"_", $node->getAttribute(
"OriginId"));
    50             $mob_id = $id_arr[count($id_arr) - 1];
    51             $mob_ids[$mob_id] = $mob_id;
    55         $path = 
"//InteractiveImage/MediaAlias";
    56         $nodes = $this->dom_util->path($dom, 
$path);
    57         foreach ($nodes as $node) {
    58             $id_arr = explode(
"_", $node->getAttribute(
"OriginId"));
    59             $mob_id = $id_arr[count($id_arr) - 1];
    60             $mob_ids[$mob_id] = $mob_id;
    64         $path = 
"//IntLink[@Type = 'MediaObject']";
    65         $nodes = $this->dom_util->path($dom, 
$path);
    66         foreach ($nodes as $node) {
    67             if (($node->getAttribute(
"TargetFrame") == 
"") ||
    69                 $target = $node->getAttribute(
"Target");
    70                 $id_arr = explode(
"_", $target);
    72                     (substr($target, 0, 4) == 
"il__")) {
    73                     $mob_id = $id_arr[count($id_arr) - 1];
    75                         $mob_ids[$mob_id] = $mob_id;
    93         foreach ($mob_ids as $mob_id => $dummy) {
    95                 $mob_obj = new \ilObjMediaObject($mob_id);
   110         $path = 
"//MediaObject/MediaAlias[@OriginId='il__mob_$a_mob_id']";
   111         $nodes = $this->dom_util->path($dom, 
$path);
   112         $mal_node = $nodes->item($a_nr - 1);
   113         $mob_node = $mal_node->parentNode;
   114         return $this->dom_util->dump($mob_node);
   120         bool $a_reuse_existing_by_import = 
false   124         $path = 
"//MediaAlias";
   126         $nodes = $this->dom_util->path($dom, 
$path);
   127         foreach ($nodes as $node) {
   129             $old_id = $node->getAttribute(
"OriginId");
   130             $old_id = explode(
"_", $old_id);
   131             $old_id = $old_id[count($old_id) - 1];
   135             if (($a_mapping[$old_id] ?? 0) > 0) {
   136                 $new_id = $a_mapping[$old_id];
   137                 if ($a_reuse_existing_by_import) {
   140                     $imp = explode(
"_", $import_id);
   148             if ($import_id == 
"" && $a_reuse_existing_by_import) {
   157                 if (in_array($old_id, $med_of_def_lang)) {
   162                 $node->setAttribute(
"OriginId", 
"il__mob_" . $new_id);
 ILIAS COPage Dom DomUtil $dom_util
 
getDomDoc()
Get dom doc (DOMDocument) 
 
static _lookupImportId(int $obj_id)
 
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data 
 
getMultimediaXML(\DOMDocument $dom)
get a xml string that contains all media object elements, that are referenced by any media alias in t...
 
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD) 
 
static _lookupType(int $id, bool $reference=false)
 
collectMediaObjects(\DOMDocument $dom, bool $a_inline_only=true)
get all media objects, that are referenced and used within the page 
 
resolveMediaAliases(\ilPageObject $page, array $a_mapping, bool $a_reuse_existing_by_import=false)
 
getMediaAliasElement(\DOMDocument $dom, int $a_mob_id, int $a_nr=1)
get complete media object (alias) element