ILIAS  trunk Revision v11.0_alpha-1838-g59fc79e306b
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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)
 

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.

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

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  }
+ 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.

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

54  : ConditionDefinition
55  {
56  return $this->definition;
57  }
+ 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.

References ilObjUser\getCountry().

49  : bool
50  {
51  return strtoupper($user->getCountry()) === strtoupper($this->criterion->arguments()['country']);
52  }
+ 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: