ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMepMultiSrt.php
Go to the documentation of this file.
1<?php
2
25{
27
28 public function __construct(ilObjMediaPool $a_mep)
29 {
30 $this->mep = $a_mep;
31 }
32
36 public function getUploadDir(): string
37 {
38 return ilFileUtils::getDataDir() . "/mep_data" .
39 "/mep_" . $this->mep->getId() . "/srt_tmp";
40 }
41
46 public function getMobIds(): array
47 {
48 $mobs = array();
49
50 foreach (ilObjMediaPool::getAllMobIds($this->mep->getId()) as $id) {
51 $mobs[$id] = $id;
52 }
53 $pages = ilMediaPoolItem::getIdsForType($this->mep->getId(), "pg");
54 foreach ($pages as $p) {
55 // all media objects
56 $pg_mobs = ilObjMediaObject::_getMobsOfObject("mep:pg", $p, 0, "");
57 foreach ($pg_mobs as $k => $pg_mob) {
58 $mobs[(int) $pg_mob] = (int) $pg_mob;
59 }
60 }
61
62 return $mobs;
63 }
64}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getDataDir()
get data directory (outside webspace)
static getIdsForType(int $a_id, string $a_type)
Get all ids for type.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getMobIds()
Get all mob ids of pool (incl mobs in snippet pages)
ilObjMediaPool $mep
getUploadDir()
Get directory for multi srt upload.
__construct(ilObjMediaPool $a_mep)
static _getMobsOfObject(string $a_type, int $a_id, int $a_usage_hist_nr=0, string $a_lang="-")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getAllMobIds(int $a_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...