ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\MetaData\Services\DataHelper\DataHelperInterface Interface Reference
+ Inheritance diagram for ILIAS\MetaData\Services\DataHelper\DataHelperInterface:
+ Collaboration diagram for ILIAS\MetaData\Services\DataHelper\DataHelperInterface:

Public Member Functions

 makePresentable (DataInterface $data)
 
 makePresentableAsList (string $separator, DataInterface ... $data)
 
 durationToArray (string $duration)
 Translates strings in the LOM-internal duration format to arrays consisting of in order years, months, days, hours, minutes, seconds. More...
 
 durationToSeconds (string $duration)
 Translates strings in the LOM-internal duration format to seconds. More...
 
 datetimeToObject (string $datetime)
 Translates strings in the LOM-internal datetime format to datetime objects. More...
 
 durationFromIntegers (?int $years, ?int $months, ?int $days, ?int $hours, ?int $minutes, ?int $seconds)
 Get a string in the LOM-internal duration format as specified by the provided integers. More...
 
 datetimeFromObject (\DateTimeImmutable $object)
 Translates datetime objects to strings in the LOM-internal datetime format. More...
 
 getAllLanguages ()
 Returns all languages that can be selected in LOM in ILIAS. More...
 

Detailed Description

Definition at line 25 of file DataHelperInterface.php.

Member Function Documentation

◆ datetimeFromObject()

ILIAS\MetaData\Services\DataHelper\DataHelperInterface::datetimeFromObject ( \DateTimeImmutable  $object)

Translates datetime objects to strings in the LOM-internal datetime format.

Note that LOM in ILIAS ignores the time part of any datetimes.

Implemented in ILIAS\MetaData\Services\DataHelper\DataHelper.

◆ datetimeToObject()

ILIAS\MetaData\Services\DataHelper\DataHelperInterface::datetimeToObject ( string  $datetime)

Translates strings in the LOM-internal datetime format to datetime objects.

Note that LOM datetimes in ILIAS only consist of a date, without a time.

Implemented in ILIAS\MetaData\Services\DataHelper\DataHelper.

◆ durationFromIntegers()

ILIAS\MetaData\Services\DataHelper\DataHelperInterface::durationFromIntegers ( ?int  $years,
?int  $months,
?int  $days,
?int  $hours,
?int  $minutes,
?int  $seconds 
)

Get a string in the LOM-internal duration format as specified by the provided integers.

Implemented in ILIAS\MetaData\Services\DataHelper\DataHelper.

◆ durationToArray()

ILIAS\MetaData\Services\DataHelper\DataHelperInterface::durationToArray ( string  $duration)

Translates strings in the LOM-internal duration format to arrays consisting of in order years, months, days, hours, minutes, seconds.

Note that durations distinguish between a field being set to zero or not set at all. In the latter case, the field has a null entry in the returned array.

Returns
int[]|null[]

Implemented in ILIAS\MetaData\Services\DataHelper\DataHelper.

◆ durationToSeconds()

ILIAS\MetaData\Services\DataHelper\DataHelperInterface::durationToSeconds ( string  $duration)

Translates strings in the LOM-internal duration format to seconds.

This is only a rough estimate, as LOM-durations do not have a start date, so e.g. each month is treated as 30 days.

Implemented in ILIAS\MetaData\Services\DataHelper\DataHelper.

◆ getAllLanguages()

ILIAS\MetaData\Services\DataHelper\DataHelperInterface::getAllLanguages ( )

Returns all languages that can be selected in LOM in ILIAS.

Returns
LabelledValueInterface[]

Implemented in ILIAS\MetaData\Services\DataHelper\DataHelper.

◆ makePresentable()

ILIAS\MetaData\Services\DataHelper\DataHelperInterface::makePresentable ( DataInterface  $data)

◆ makePresentableAsList()

ILIAS\MetaData\Services\DataHelper\DataHelperInterface::makePresentableAsList ( string  $separator,
DataInterface ...  $data 
)

The documentation for this interface was generated from the following file: