46         $this->media_manager = $DIC->mediaObjects()->internal()->domain()->mediaObject();
    56         $this->use_previous_import_ids = $a_val;
    69         return array(
"10.0", 
"5.1.0", 
"4.3.0", 
"4.1.0");
    72     protected function getXmlNamespace(
string $a_entity, 
string $a_schema_version): string
    74         return "https://www.ilias.de/xml/Services/MediaObject/" . $a_entity;
    77     protected function getTypes(
string $a_entity, 
string $a_version): array
    80         if ($a_entity == 
"mob") {
    87                         "Description" => 
"text",
    94                         "Description" => 
"text",
   102                         "Description" => 
"text",
   103                         "MediaContainer" => 
"rscontainer",
   110         if ($a_entity == 
"mob_media_item") {
   111             switch ($a_version) {
   118                         "MobId" => 
"integer",
   119                         "Width" => 
"integer",
   120                         "Height" => 
"integer",
   125                         "Location" => 
"text",
   126                         "LocationType" => 
"text",
   128                         "TextRepresentation" => 
"text"   134         if ($a_entity == 
"mob_mi_map_area") {
   135             switch ($a_version) {
   145                         "LinkType" => 
"text",
   150                         "TargetFrame" => 
"text",
   151                         "HighlightMode" => 
"text",
   152                         "HighlightText" => 
"text"   158         if ($a_entity == 
"mob_mi_parameter") {
   159             switch ($a_version) {
   181         if (!is_array($a_ids)) {
   182             $a_ids = array($a_ids);
   186         if ($a_entity == 
"mob") {
   187             $this->data = array();
   189             switch ($a_version) {
   192                     foreach ($a_ids as $mob_id) {
   194                             $this->data[] = array(
"Id" => $mob_id,
   203                     foreach ($a_ids as $mob_id) {
   205                             $this->data[] = array(
"Id" => $mob_id,
   217         if ($a_entity == 
"mob_media_item") {
   218             switch ($a_version) {
   224                         "caption, nr, purpose, location, location_type, format, text_representation" .
   225                         " FROM media_item WHERE " .
   226                         $ilDB->in(
"mob_id", $a_ids, 
false, 
"integer"));
   233         if ($a_entity == 
"mob_mi_map_area") {
   234             switch ($a_version) {
   240                         " ,shape, coords, link_type, title, href, target, type, target_frame, " .
   241                         " highlight_mode, highlight_class" .
   244                         $ilDB->in(
"item_id", $a_ids, 
false, 
"integer") .
   245                         " ORDER BY nr", 
true, 
false) as 
$r) {
   249                         if ($r[
"Type"] == 
"RepositoryItem") {
   250                             $id_arr = explode(
"_", $r[
"Target"]);
   257                                 $r[
"Target"] = 
"il_" . $id_arr[1] . 
"_" . 
$id;
   268         if ($a_entity == 
"mob_mi_parameter") {
   269             switch ($a_version) {
   275                         " FROM mob_parameter " .
   277                         $ilDB->in(
"med_item_id", $a_ids, 
false, 
"integer"));
   289         ?array $a_rec = null,
   295                     "mob_media_item" => array(
"ids" => $a_rec[
"Id"] ?? null)
   298             case "mob_media_item":
   300                     "mob_mi_map_area" => array(
"ids" => $a_rec[
"Id"] ?? null),
   301                     "mob_mi_parameter" => array(
"ids" => $a_rec[
"Id"] ?? null)
   313         if ($a_entity === 
"mob") {
   314             $a_set[
"MediaContainer"] = serialize($this->media_manager->getContainerResourceId((
int) $a_set[
"Id"]));
   327         if ($entity === 
"mob" && $field === 
"MediaContainer") {
   328             $rid = $this->media_manager->getContainerResourceId((
int) $record[
"Id"]);
   330                 $container = $this->irss->manageContainer()->getResource($rid);
   347         string $a_schema_version
   354                 $newObj->setType(
"mob");
   355                 $newObj->setTitle($a_rec[
"Title"]);
   356                 $newObj->setDescription($a_rec[
"Description"]);
   359                     $newObj->setImportId($a_rec[
"ImportId"]);
   364                 $this->current_mob = $newObj;
   367                 $dir = str_replace(
"..", 
"", ($a_rec[
"Dir"] ?? 
""));
   370                     $this->media_manager->addLocalDirectory($newObj->getId(), $source_dir);
   374                 $dir = str_replace(
"..", 
"", ($a_rec[
"MediaContainer"] ?? 
""));
   377                     if (is_dir($source_dir)) {
   378                         $this->media_manager->addLocalDirectory($newObj->getId(), $source_dir);
   382                 $a_mapping->
addMapping(
"components/ILIAS/MediaObjects", 
"mob", $a_rec[
"Id"], $newObj->getId());
   384                     "components/ILIAS/MetaData",
   386                     "0:" . $a_rec[
"Id"] . 
":mob",
   387                     "0:" . $newObj->getId() . 
":mob"   391             case "mob_media_item":
   394                 $mob_id = (
int) $a_mapping->
getMapping(
"components/ILIAS/MediaObjects", 
"mob", $a_rec[
"MobId"]);
   395                 if (is_object($this->current_mob) && $this->current_mob->getId() == $mob_id) {
   402                 $newObj->setMobId($mob_id);
   403                 $newObj->setWidth($a_rec[
"Width"]);
   404                 $newObj->setHeight($a_rec[
"Height"]);
   405                 $newObj->setCaption($a_rec[
"Caption"]);
   406                 $newObj->setNr($a_rec[
"Nr"]);
   407                 $newObj->setPurpose($a_rec[
"Purpose"]);
   408                 $newObj->setLocation($a_rec[
"Location"]);
   409                 $newObj->setLocationType($a_rec[
"LocationType"]);
   410                 $newObj->setFormat($a_rec[
"Format"]);
   411                 $newObj->setTextRepresentation($a_rec[
"TextRepresentation"]);
   413                 $this->current_media_item = $newObj;
   415                 $a_mapping->
addMapping(
"components/ILIAS/MediaObjects", 
"mob_media_item", $a_rec[
"Id"], $newObj->getId());
   419             case "mob_mi_parameter":
   422                 $med_id = (
int) $a_mapping->
getMapping(
"components/ILIAS/MediaObjects", 
"mob_media_item", $a_rec[
"MiId"]);
   423                 if (is_object($this->current_media_item) && $this->current_media_item->getId() == $med_id) {
   428                 $med->writeParameter($a_rec[
"Name"], $a_rec[
"Value"]);
   432             case "mob_mi_map_area":
   434                 $med_id = (
int) $a_mapping->
getMapping(
"components/ILIAS/MediaObjects", 
"mob_media_item", $a_rec[
"MiId"]);
   435                 if (is_object($this->current_media_item) && $this->current_media_item->getId() == $med_id) {
   442                 $map_area->setItemId($med_id);
   443                 $map_area->setNr($a_rec[
"Nr"]);
   444                 $map_area->setShape($a_rec[
"Shape"]);
   445                 $map_area->setCoords($a_rec[
"Coords"]);
   446                 $map_area->setLinkType($a_rec[
"LinkType"]);
   447                 $map_area->setTitle($a_rec[
"Title"]);
   448                 $map_area->setHref($a_rec[
"Href"]);
   449                 $map_area->setTarget($a_rec[
"Target"]);
   450                 $map_area->setType($a_rec[
"Type"]);
   451                 $map_area->setTargetFrame($a_rec[
"TargetFrame"]);
   452                 $map_area->setHighlightMode($a_rec[
"HighlightMode"]);
   453                 $map_area->setHighlightClass($a_rec[
"HighlightClass"]);
 
static getLogger(string $a_component_id)
Get component logger. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
 
getIRSSContainerExportConfig(StorableResource $source_container, string $source_path, string $target_path="")
 
static _lookupObjId(int $ref_id)
 
static _lookupImportId(int $obj_id)
 
getMapping(string $a_comp, string $a_entity, string $a_old_id)
 
static _lookupTitle(int $obj_id)
 
getCurrentInstallationId()
 
static _lookupDescription(int $obj_id)
 
getDirectDataFromQuery(string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
__construct(Container $dic, ilPlugin $plugin)
 
stripTags(array $rec, array $omit_keys=[])
 
static _lookupType(int $id, bool $reference=false)
 
static insertInstIntoID(string $a_value)
inserts installation id into ILIAS id