ILIAS
trunk Revision v11.0_alpha-1753-gb21ca8c4367
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
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
}
ilSumOfWorkspaceFileSizesTooLargeInteraction\interaction
interaction(array $input, Option $user_selected_option, Bucket $bucket)
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:57
ILIAS\BackgroundTasks\Bucket\setState
setState(int $state)
SingleType
ilLanguage
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractUserInteraction
Definition:
AbstractUserInteraction.php:29
ilSumOfWorkspaceFileSizesTooLargeInteraction\getSkippedValue
getSkippedValue(array $input)
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:94
ilSumOfWorkspaceFileSizesTooLargeInteraction\getInputTypes
getInputTypes()
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:40
ILIAS\BackgroundTasks\Task\UserInteraction\Option
Definition:
Option.php:27
ILIAS\BackgroundTasks\Value
Definition:
Value.php:29
ILIAS\BackgroundTasks\Bucket
Definition:
Bucket.php:29
ILIAS\BackgroundTasks\Types\Type
Definition:
Type.php:21
ilSumOfWorkspaceFileSizesTooLargeInteraction\getOptions
getOptions(array $input)
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:70
ILIAS\BackgroundTasks\Types\SingleType
Definition:
SingleType.php:21
ilSumOfWorkspaceFileSizesTooLargeInteraction
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:27
ILIAS\Repository\lng
lng()
Definition:
trait.GlobalDICDomainServices.php:61
Bucket
ilSumOfWorkspaceFileSizesTooLargeInteraction\OPTION_SKIP
const OPTION_SKIP
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:30
$DIC
global $DIC
Definition:
shib_login.php:22
ILIAS\AdvancedMetaData\Data\FieldDefinition\Type
Type
Definition:
Type.php:23
ilSumOfWorkspaceFileSizesTooLargeInteraction\__construct
__construct()
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:33
ilSumOfWorkspaceFileSizesTooLargeInteraction\$lng
ilLanguage $lng
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:31
ilSumOfWorkspaceFileSizesTooLargeInteraction\getRemoveOption
getRemoveOption()
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:52
ilSumOfWorkspaceFileSizesTooLargeInteraction\getMessage
getMessage(array $input)
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:75
ilSumOfWorkspaceFileSizesTooLargeInteraction\OPTION_OK
const OPTION_OK
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:29
ilSumOfWorkspaceFileSizesTooLargeInteraction\isFinal
isFinal()
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:99
ilSumOfWorkspaceFileSizesTooLargeInteraction\getOutputType
getOutputType()
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:47
UserInteractionOption
ILIAS\BackgroundTasks\Implementation\Tasks\UserInteraction\UserInteractionOption
Definition:
UserInteractionOption.php:23
Value
Option
AbstractUserInteraction
ILIAS\BackgroundTasks\Task\UserInteraction\Option\getValue
getValue()
ilSumOfWorkspaceFileSizesTooLargeInteraction\canBeSkipped
canBeSkipped(array $input)
Decide whether the UserInteraction is presented to the user and he has to decide or user UserInteract...
Definition:
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php:80
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask\$input
array $input
Definition:
AbstractTask.php:44
components
ILIAS
WorkspaceFolder
BackgroundTask
classes
class.ilSumOfWorkspaceFileSizesTooLargeInteraction.php
Generated on Thu Apr 10 2025 23:04:36 for ILIAS by
1.8.13 (using
Doxyfile
)