53 new SingleType(ilWorkspaceCopyDefinition::class),
59 return new SingleType(ilWorkspaceCopyDefinition::class);
69 $this->
logger->debug(
'Start checking adherence to maxsize!');
70 $this->
logger->dump($input);
72 $object_wps_ids = $definition->getObjectWspIds();
76 $size_limit =
$general->getDownloadLimitinMB();
77 $size_limit_bytes = $size_limit * 1024 * 1024;
78 $this->
logger->debug(
'Global limit (max sum of all file-sizes) in file-settings: ' . $size_limit_bytes .
' bytes');
82 $this->
logger->debug(
'Calculated sum of all file-sizes: ' . $total_bytes .
' B');
85 $adheres_to_limit->setValue(
true);
86 if ($total_bytes > $size_limit_bytes) {
87 $adheres_to_limit->setValue(
false);
90 $definition->setSumFileSizes($total_bytes);
91 $definition->setAdheresToLimit($adheres_to_limit);
101 array $object_wps_ids,
108 foreach ($object_wps_ids as $object_wps_id) {
114 $obj_id = $this->tree->lookupObjectId($object_wps_id);
120 if (count($subtree) > 0) {
121 $child_wsp_ids = array();
122 foreach ($subtree as $child) {
123 $child_wsp_ids[] = $child[
"child"];
140 if (!$ilAccess->checkAccess(
"read",
"", $wsp_id)) {
Description of class class.
getExpectedTimeOfTaskInSeconds()
calculateRecursive(array $object_wps_ids, int &$a_file_size)
Calculates the number and size of the files being downloaded recursively.
validateAccess(int $wsp_id)
run(array $input, \ILIAS\BackgroundTasks\Observer $observer)
static getLogger(string $a_component_id)
Get component logger.
Component logger with individual log levels by component id.
static _lookupFileSize(int $a_id, bool $by_reference=true)
static _lookupType(int $id, bool $reference=false)
getChildsByTypeFilter(int $a_node_id, array $a_types, string $a_order="", string $a_direction="ASC")
get child nodes of given node by object type
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.