ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\LegalDocuments\Condition\UserCountry Class Reference
+ Inheritance diagram for ILIAS\LegalDocuments\Condition\UserCountry:
+ Collaboration diagram for ILIAS\LegalDocuments\Condition\UserCountry:

Public Member Functions

 __construct (private readonly CriterionContent $criterion, private readonly UserCountryDefinition $definition, private readonly UIFactory $create)
 
 asComponent ()
 
 eval (ilObjUser $user)
 
 definition ()
 
 knownToNeverMatchWith (Condition $other)
 
 asComponent ()
 
 eval (ilObjUser $user)
 
 knownToNeverMatchWith (Condition $other)
 
 definition ()
 

Detailed Description

Definition at line 31 of file UserCountry.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\Condition\UserCountry::__construct ( private readonly CriterionContent  $criterion,
private readonly UserCountryDefinition  $definition,
private readonly UIFactory  $create 
)

Definition at line 33 of file UserCountry.php.

37 {
38 }

Member Function Documentation

◆ asComponent()

ILIAS\LegalDocuments\Condition\UserCountry::asComponent ( )

Implements ILIAS\LegalDocuments\Condition.

Definition at line 40 of file UserCountry.php.

40 : Component
41 {
42 return $this->create->legacy()->content(sprintf(
43 '<div><b>%s</b><br/>%s</div>',
44 $this->definition->translatedType(),
45 $this->definition->translatedCountry($this->criterion->arguments()['country'] ?? '')
46 ));
47 }

References ILIAS\LegalDocuments\Condition\UserCountry\definition().

+ Here is the call graph for this function:

◆ definition()

ILIAS\LegalDocuments\Condition\UserCountry::definition ( )

Implements ILIAS\LegalDocuments\Condition.

Definition at line 54 of file UserCountry.php.

54 : ConditionDefinition
55 {
56 return $this->definition;
57 }

Referenced by ILIAS\LegalDocuments\Condition\UserCountry\asComponent().

+ Here is the caller graph for this function:

◆ eval()

ILIAS\LegalDocuments\Condition\UserCountry::eval ( ilObjUser  $user)

Implements ILIAS\LegalDocuments\Condition.

Definition at line 49 of file UserCountry.php.

49 : bool
50 {
51 return strtoupper($user->getCountry()) === strtoupper($this->criterion->arguments()['country']);
52 }

References ilObjUser\getCountry().

+ Here is the call graph for this function:

◆ knownToNeverMatchWith()

ILIAS\LegalDocuments\Condition\UserCountry::knownToNeverMatchWith ( Condition  $other)

Implements ILIAS\LegalDocuments\Condition.

Definition at line 59 of file UserCountry.php.

59 : bool
60 {
61 return $other instanceof (self::class);
62 }

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