19declare(strict_types=1);
46 $this->
logger = $DIC->logger()->cal();
93 $download_name =
$input[0];
95 $this->
logger->debug(
'User interaction download zip ' . $input[0]->
getValue() .
' as '
98 if ($user_selected_option->
getValue() != self::OPTION_DOWNLOAD) {
99 $this->
logger->info(
'Download canceled');
101 $filesystem =
$DIC->filesystem()->temp();
104 $path = LegacyPathHelper::createRelativePath($zip_name->getValue());
105 }
catch (InvalidArgumentException
$e) {
108 if (!is_null(
$path) && $filesystem->has(
$path)) {
109 $filesystem->deleteDir(dirname(
$path));
113 return $download_name;
116 $this->
logger->info(
"Delivering File.");
119 $download_name->getValue(),
120 $zip_name->getValue(),
121 MimeType::APPLICATION__ZIP
125 return $download_name;
The legacy path helper provides convenient functions for the integration of the filesystem service wi...
Description of class class.
getInputTypes()
Type[] A list of types that are taken as input.
getOutputType()
@inheritDoc
getRemoveOption()
@inheritDoc
interaction(array $input, Option $user_selected_option, Bucket $bucket)
@inheritDoc
getOptions(array $input)
@inheritDoc
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.