ILIAS
trunk Revision v11.0_alpha-1769-g99a433fe2dc
◀ 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.ilDclDatetimeRecordFieldModel.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
class
ilDclDatetimeRecordFieldModel
extends
ilDclBaseRecordFieldModel
22
{
26
public
function
parseValue
(
$value
): string
27
{
28
return
(
string
)
$value
;
29
}
30
31
public
function
getValueFromExcel
(
ilExcel
$excel,
int
$row,
int
$col): ?string
32
{
33
$value
= parent::getValueFromExcel($excel, $row, $col);
34
35
if
(
$value
) {
36
return
date(
'Y-m-d'
, strtotime(
$value
));
37
}
else
{
38
return
""
;
39
}
40
}
41
46
public
function
parseExportValue
(
$value
): ?string
47
{
48
return
(
new
ilDate
(
$value
,
IL_CAL_DATE
))->get(
IL_CAL_DATE
);
49
}
50
55
public
function
parseSortingValue
(
$value
,
bool
$link =
true
): ?
int
56
{
57
return
strtotime(
$value
);
58
}
59
60
public
function
getFormulaValue
(): string
61
{
62
// getValue returns the field value, but in this case it is formatted. For the calculations in Formelns the value is needed as Unix timestamp (as string).
63
$value
= $this->
getValue
();
64
return
(
string
) strtotime(
$value
?
$value
:
''
);
65
}
66
}
ilExcel
Definition:
class.ilExcel.php:34
ilDclBaseRecordFieldModel\$value
$value
Definition:
class.ilDclBaseRecordFieldModel.php:29
ilDate
ilDclBaseRecordFieldModel
Definition:
class.ilDclBaseRecordFieldModel.php:21
ilDclDatetimeRecordFieldModel\parseSortingValue
parseSortingValue($value, bool $link=true)
Returns sortable value for the specific field-types.
Definition:
class.ilDclDatetimeRecordFieldModel.php:55
ilDclDatetimeRecordFieldModel
Definition:
class.ilDclDatetimeRecordFieldModel.php:21
ilDclDatetimeRecordFieldModel\getValueFromExcel
getValueFromExcel(ilExcel $excel, int $row, int $col)
Definition:
class.ilDclDatetimeRecordFieldModel.php:31
ilDclBaseRecordFieldModel\getValue
getValue()
Definition:
class.ilDclBaseRecordFieldModel.php:148
ilDclDatetimeRecordFieldModel\parseValue
parseValue($value)
Definition:
class.ilDclDatetimeRecordFieldModel.php:26
ilDclDatetimeRecordFieldModel\getFormulaValue
getFormulaValue()
Definition:
class.ilDclDatetimeRecordFieldModel.php:60
IL_CAL_DATE
const IL_CAL_DATE
Definition:
class.ilDateTime.php:22
ilDclDatetimeRecordFieldModel\parseExportValue
parseExportValue($value)
Function to parse incoming data from form input value $value.
Definition:
class.ilDclDatetimeRecordFieldModel.php:46
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
components
ILIAS
DataCollection
classes
Fields
Datetime
class.ilDclDatetimeRecordFieldModel.php
Generated on Sun Apr 13 2025 23:02:45 for ILIAS by
1.8.13 (using
Doxyfile
)