38 protected \ilLanguage
$lng;
47 $this->
lng = $DIC->language();
48 $this->
lng->loadLanguageModule(
'mcst');
49 $this->
logger = $DIC->logger()->mcst();
51 $this->sanitized_title =
"images";
80 $this->user_id = $input[0]->
getValue();
81 $this->mcst_ref_id = $input[1]->getValue();
83 $this->
logger->debug(
"Get Mediacast " . $this->mcst_ref_id);
84 $this->media_cast = new \ilObjMediaCast($this->mcst_ref_id);
88 $this->
logger->debug(
"Collect in " . $target_dir);
90 $this->
logger->debug(
"Finished collecting.");
93 $out->setValue($target_dir);
103 $path = $this->temp_dir . DIRECTORY_SEPARATOR;
113 foreach ($this->media_cast->getSortedItemsArray() as $item) {
114 $mob = new \ilObjMediaObject($item[
"mob_id"]);
115 $med = $mob->getMediaItem(
"Standard");
118 $str_cnt = str_pad($cnt, 4,
"0", STR_PAD_LEFT);
120 if ($med->getLocationType() ===
"Reference") {
121 $resource = $med->getLocation();
122 copy($resource, $target_dir . DIRECTORY_SEPARATOR . $str_cnt . basename($resource));
124 $stream = $med->getLocationStream();
126 $target_dir . DIRECTORY_SEPARATOR . $str_cnt . $med->getLocation(),
127 $stream->getContents()
Interface Observer Contains several chained tasks and infos about them.
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
Component logger with individual log levels by component id.