Download all items.
More...
|
| __construct (int $a_usr_id, int $a_mcst_ref_id, int $a_mcst_id) |
|
| run () |
|
Download all items.
- Author
- Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Definition at line 28 of file DownloadAllBackgroundTask.php.
◆ __construct()
ILIAS\MediaCast\BackgroundTasks\DownloadAllBackgroundTask::__construct |
( |
int |
$a_usr_id, |
|
|
int |
$a_mcst_ref_id, |
|
|
int |
$a_mcst_id |
|
) |
| |
Definition at line 38 of file DownloadAllBackgroundTask.php.
References $DIC, and ILIAS\Repository\logger().
45 $this->user_id = $a_usr_id;
46 $this->mcst_ref_id = $a_mcst_ref_id;
47 $this->mcst_id = $a_mcst_id;
49 $this->task_factory = $DIC->backgroundTasks()->taskFactory();
50 $this->task_manager = $DIC->backgroundTasks()->taskManager();
51 $this->
logger = $DIC->logger()->mcst();
◆ run()
ILIAS\MediaCast\BackgroundTasks\DownloadAllBackgroundTask::run |
( |
| ) |
|
Definition at line 54 of file DownloadAllBackgroundTask.php.
References ilObject\_lookupTitle(), ilFileUtils\getASCIIFilename(), and ILIAS\Repository\logger().
56 $bucket =
new BasicBucket();
57 $bucket->setUserId($this->user_id);
59 $this->
logger->debug(
"* Create task 'collect_data_job' using the following values:");
60 $this->
logger->debug(
"job class = " . DownloadAllCollectFilesJob::class);
61 $this->
logger->debug(
"mcst_id = " . $this->mcst_id .
", mcst_ref_id = " . $this->mcst_ref_id .
", user_id = " . (
int) $this->user_id);
63 $collect_data_job = $this->task_factory->createTask(
64 DownloadAllCollectFilesJob::class,
67 (
int) $this->mcst_ref_id
71 $this->
logger->debug(
"* Create task 'zip job' using the following values:");
72 $this->
logger->debug(
"job class = " . DownloadAllZipJob::class);
73 $this->
logger->debug(
"sending as input the task called->collect_data_job");
75 $zip_job = $this->task_factory->createTask(DownloadAllZipJob::class, [$collect_data_job]);
78 $bucket->setTitle($download_name);
80 $this->
logger->debug(
"* Create task 'download_interaction' using the following values:");
81 $this->
logger->debug(
"job class = " . DownloadAllZipInteraction::class);
82 $this->
logger->debug(
"download_name which is the same as bucket title = " . $download_name .
" + the zip_job task");
84 $download_interaction = $this->task_factory->createTask(DownloadAllZipInteraction::class, [$zip_job, $download_name]);
87 $bucket->setTask($download_interaction);
88 $this->task_manager->run($bucket);
static getASCIIFilename(string $a_filename)
static _lookupTitle(int $obj_id)
◆ $lng
ilLanguage ILIAS\MediaCast\BackgroundTasks\DownloadAllBackgroundTask::$lng |
|
protected |
◆ $logger
ilLogger ILIAS\MediaCast\BackgroundTasks\DownloadAllBackgroundTask::$logger = null |
|
private |
◆ $mcst_id
int ILIAS\MediaCast\BackgroundTasks\DownloadAllBackgroundTask::$mcst_id = 0 |
|
protected |
◆ $mcst_ref_id
int ILIAS\MediaCast\BackgroundTasks\DownloadAllBackgroundTask::$mcst_ref_id = 0 |
|
protected |
◆ $task_factory
◆ $task_manager
◆ $user_id
int ILIAS\MediaCast\BackgroundTasks\DownloadAllBackgroundTask::$user_id = null |
|
protected |
The documentation for this class was generated from the following file: