45 $this->
logger = $DIC->logger()->mcst();
76 Option $user_selected_option,
80 $download_name = $input[0];
81 $zip_name = $input[1];
83 $this->
logger->debug(
"Interaction -> input[0] download name MUST BE FULL PATH=> " . $download_name->getValue());
84 $this->
logger->debug(
"Interaction -> input[1] zip name MUST BE THE NAME WITHOUT EXTENSION. => " . $zip_name->getValue());
86 if ($user_selected_option->
getValue() != self::OPTION_DOWNLOAD) {
87 $this->
logger->info(
'Download canceled');
89 $filesystem = $DIC->filesystem()->temp();
91 $path = LegacyPathHelper::createRelativePath($zip_name->getValue());
95 if (!is_null(
$path) && $filesystem->has(
$path)) {
96 $filesystem->deleteDir(dirname(
$path));
102 $this->
logger->info(
"Delivering File.");
105 $zip_name = $zip_name->getValue();
107 $ending = substr($zip_name, -4);
108 if ($ending !=
".zip") {
110 $this->
logger->info(
"Add .zip extension");
Interface Observer Contains several chained tasks and infos about them.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static deliverFileAttached(string $path_to_file, ?string $download_file_name=null, ?string $mime_type=null, bool $delete_file=false)
Component logger with individual log levels by component id.