ILIAS
release_8 Revision v8.24
◀ ilDoc Overview
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php
Go to the documentation of this file.
1
<?php
2
19
use
ILIAS\BackgroundTasks\Bucket
;
20
use
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractUserInteraction
;
21
use
ILIAS\BackgroundTasks\Implementation\Tasks\UserInteraction\UserInteractionOption
;
22
use
ILIAS\BackgroundTasks\Task\UserInteraction\Option
;
23
use
ILIAS\BackgroundTasks\Types\SingleType
;
24
use
ILIAS\BackgroundTasks\Types\Type
;
25
use
ILIAS\BackgroundTasks\Value
;
26
27
class
ilSumOfWorkspaceFileSizesTooLargeInteraction
extends
AbstractUserInteraction
28
{
29
public
const
OPTION_OK
=
'ok'
;
30
public
const
OPTION_SKIP
=
'skip'
;
31
protected
ilLanguage
$lng
;
32
33
public
function
__construct
()
34
{
35
global
$DIC
;
36
$this->
lng
= $DIC->language();
37
$this->
lng
->loadLanguageModule(
'background_tasks'
);
38
}
39
40
public
function
getInputTypes
(): array
41
{
42
return
[
43
new
SingleType
(ilWorkspaceCopyDefinition::class),
44
];
45
}
46
47
public
function
getOutputType
():
Type
48
{
49
return
new
SingleType
(ilWorkspaceCopyDefinition::class);
50
}
51
52
public
function
getRemoveOption
():
Option
53
{
54
return
new
UserInteractionOption
(
'ok'
, self::OPTION_OK);
55
}
56
57
public
function
interaction
(
58
array
$input
,
59
Option
$user_selected_option,
60
Bucket
$bucket
61
):
Value
{
62
if
($user_selected_option->
getValue
() == self::
OPTION_OK
) {
63
// Set state to finished to stop the BackgroundTask and remove it from the popover.
64
$bucket->
setState
(3);
65
}
66
67
return
$input
[0];
68
}
69
70
public
function
getOptions
(array $input): array
71
{
72
return
array();
73
}
74
75
public
function
getMessage
(array $input): string
76
{
77
return
$this->
lng
->txt(
'ui_msg_files_violate_maxsize'
);
78
}
79
80
public
function
canBeSkipped
(array $input): bool
81
{
82
$copy_definition = $input[0];
83
if
($copy_definition->getAdheresToLimit()->getValue()) {
84
// skip the user interaction if the adherence to the global limit for the sum of file sizes
85
// hasn't been violated (as this interaction is used as an error message and mustn't be
86
// shown when everything is fine))
87
88
return
true
;
89
}
else
{
90
return
false
;
91
}
92
}
93
94
public
function
getSkippedValue
(array $input):
Value
95
{
96
return
$input[0];
97
}
98
99
public
function
isFinal
(): bool
100
{
101
return
false
;
102
}
103
104
}
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask\$input
array $input
Definition:
AbstractTask.php:44
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractUserInteraction
Definition:
AbstractUserInteraction.php:30
ILIAS\BackgroundTasks\Implementation\Tasks\UserInteraction\UserInteractionOption
Definition:
UserInteractionOption.php:24
ILIAS\BackgroundTasks\Types\SingleType
Definition:
SingleType.php:22
ilLanguage
language handling
Definition:
class.ilLanguage.php:44
ilSumOfWorkspaceFileSizesTooLargeInteraction
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:28
ilSumOfWorkspaceFileSizesTooLargeInteraction\getOptions
getOptions(array $input)
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:70
ilSumOfWorkspaceFileSizesTooLargeInteraction\getOutputType
getOutputType()
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:47
ilSumOfWorkspaceFileSizesTooLargeInteraction\getRemoveOption
getRemoveOption()
Option An Option to remove the current task and do some cleanup if possible. This Option is displayed...
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:52
ilSumOfWorkspaceFileSizesTooLargeInteraction\getMessage
getMessage(array $input)
@inheritDoc
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:75
ilSumOfWorkspaceFileSizesTooLargeInteraction\OPTION_SKIP
const OPTION_SKIP
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:30
ilSumOfWorkspaceFileSizesTooLargeInteraction\getInputTypes
getInputTypes()
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:40
ilSumOfWorkspaceFileSizesTooLargeInteraction\OPTION_OK
const OPTION_OK
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:29
ilSumOfWorkspaceFileSizesTooLargeInteraction\$lng
ilLanguage $lng
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:31
ilSumOfWorkspaceFileSizesTooLargeInteraction\interaction
interaction(array $input, Option $user_selected_option, Bucket $bucket)
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:57
ilSumOfWorkspaceFileSizesTooLargeInteraction\__construct
__construct()
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:33
ilSumOfWorkspaceFileSizesTooLargeInteraction\isFinal
isFinal()
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:99
ilSumOfWorkspaceFileSizesTooLargeInteraction\canBeSkipped
canBeSkipped(array $input)
@inheritDoc
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:80
ilSumOfWorkspaceFileSizesTooLargeInteraction\getSkippedValue
getSkippedValue(array $input)
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:94
if
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
confirmReg.php:20
$DIC
global $DIC
Definition:
feed.php:28
ILIAS\BackgroundTasks\Bucket
Definition:
Bucket.php:30
ILIAS\BackgroundTasks\Bucket\setState
setState(int $state)
ILIAS\BackgroundTasks\Task\UserInteraction\Option
Definition:
Option.php:28
ILIAS\BackgroundTasks\Types\Type
Definition:
Type.php:22
ILIAS\BackgroundTasks\Value
Definition:
Value.php:30
ILIAS\Repository\lng
lng()
Definition:
trait.GlobalDICDomainServices.php:56
ILIAS\UI\Implementation\Component\Input\getValue
getValue()
Get the value that is displayed in the input client side.
Definition:
Group.php:47
Modules
WorkspaceFolder
BackgroundTask
classes
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php
Generated on Sun Nov 2 2025 22:01:26 for ILIAS by
1.9.4 (using
Doxyfile
)