ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\MetaData\Presentation\Utilities Class Reference
+ Inheritance diagram for ILIAS\MetaData\Presentation\Utilities:
+ Collaboration diagram for ILIAS\MetaData\Presentation\Utilities:

Public Member Functions

 __construct (\ilLanguage $lng, \ilObjUser $user, Refinery $refinery)
 
 getUserDateFormat ()
 
 txt (string $key)
 
 txtFill (string $key, string ... $values)
 
 sanitizeForHTML (string $string)
 
 getUserDateFormat ()
 
 txt (string $key)
 
 txtFill (string $key, string ... $values)
 
 sanitizeForHTML (string $string)
 

Protected Attributes

ilLanguage $lng
 
ilObjUser $user
 
Refinery $refinery
 

Detailed Description

Definition at line 26 of file Utilities.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\MetaData\Presentation\Utilities::__construct ( \ilLanguage  $lng,
\ilObjUser  $user,
Refinery  $refinery 
)

Member Function Documentation

◆ getUserDateFormat()

ILIAS\MetaData\Presentation\Utilities::getUserDateFormat ( )

Implements ILIAS\MetaData\Presentation\UtilitiesInterface.

Definition at line 43 of file Utilities.php.

43 : DateFormat
44 {
45 return $this->user->getDateFormat();
46 }

References ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ sanitizeForHTML()

ILIAS\MetaData\Presentation\Utilities::sanitizeForHTML ( string  $string)

Implements ILIAS\MetaData\Presentation\UtilitiesInterface.

Definition at line 61 of file Utilities.php.

61 : string
62 {
63 return $this->refinery->encode()->htmlSpecialCharsAsEntities()->transform($string);
64 }

References ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ txt()

ILIAS\MetaData\Presentation\Utilities::txt ( string  $key)

Implements ILIAS\MetaData\Presentation\UtilitiesInterface.

Definition at line 48 of file Utilities.php.

48 : string
49 {
50 return $this->lng->txt($key);
51 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ txtFill()

ILIAS\MetaData\Presentation\Utilities::txtFill ( string  $key,
string ...  $values 
)

Implements ILIAS\MetaData\Presentation\UtilitiesInterface.

Definition at line 53 of file Utilities.php.

53 : string
54 {
55 if ($this->lng->exists($key)) {
56 return sprintf($this->lng->txt($key), ...$values);
57 }
58 return $key . ' ' . implode(', ', $values);
59 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilLanguage ILIAS\MetaData\Presentation\Utilities::$lng
protected

Definition at line 28 of file Utilities.php.

Referenced by ILIAS\MetaData\Presentation\Utilities\__construct().

◆ $refinery

Refinery ILIAS\MetaData\Presentation\Utilities::$refinery
protected

Definition at line 30 of file Utilities.php.

Referenced by ILIAS\MetaData\Presentation\Utilities\__construct().

◆ $user

ilObjUser ILIAS\MetaData\Presentation\Utilities::$user
protected

Definition at line 29 of file Utilities.php.

Referenced by ILIAS\MetaData\Presentation\Utilities\__construct().


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