53 new SingleType(ilWorkspaceCopyDefinition::class),
63 return new SingleType(ilWorkspaceCopyDefinition::class);
82 $this->logger->debug(
'Start checking adherence to maxsize!');
83 $this->logger->dump(
$input);
85 $object_wps_ids = $definition->getObjectWspIds();
88 $size_limit = (int) $this->
settings->get(
"bgtask_download_limit", 0);
89 $size_limit_bytes = $size_limit * 1024 * 1024;
90 $this->logger->debug(
'Global limit (max sum of all file-sizes) in file-settings: ' . $size_limit_bytes .
' bytes');
94 $this->logger->debug(
'Calculated sum of all file-sizes: ' . $total_bytes .
'MB');
97 $adheres_to_limit->setValue(
true);
98 if ($total_bytes > $size_limit_bytes) {
99 $adheres_to_limit->setValue(
false);
102 $definition->setSumFileSizes($total_bytes);
103 $definition->setAdheresToLimit($adheres_to_limit);
122 foreach ($object_wps_ids as $object_wps_id) {
128 $obj_id = $this->tree->lookupObjectId($object_wps_id);
133 $subtree =
$tree->getChildsByTypeFilter($object_wps_id, array(
"wfld",
"file"));
134 if (count($subtree) > 0) {
135 $child_ref_ids = array();
136 foreach ($subtree as $child) {
137 $child_wsp_ids[] = $child[
"child"];
162 if (!$ilAccess->checkAccess(
"read",
"", $wsp_id)) {
An exception for terminatinating execution or to throw for unit testing.
Description of class class.
getExpectedTimeOfTaskInSeconds()
int the amount of seconds this task usually taskes. If your task-duration scales with the the amount ...
validateAccess($wsp_id)
Check file access.
getOutputType()
@inheritDoc
calculateRecursive($object_wps_ids, &$a_file_size)
Calculates the number and size of the files being downloaded recursively.
getInputTypes()
@inheritDoc
run(array $input, \ILIAS\BackgroundTasks\Observer $observer)
@inheritDoc
static getLogger($a_component_id)
Get component logger.
static _lookupFileSize($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
Access handler for personal workspace.
Tree handler for personal workspace.
Class ChatMainBarProvider \MainMenu\Provider.