ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilBuddySystemRequestedRelationStateTableFilterMapper Class Reference
+ Inheritance diagram for ilBuddySystemRequestedRelationStateTableFilterMapper:
+ Collaboration diagram for ilBuddySystemRequestedRelationStateTableFilterMapper:

Public Member Functions

 optionsForState ()
 
 filterMatchesRelation (string $filter_key, ilBuddySystemRelation $relation)
 
- Public Member Functions inherited from ilAbstractBuddySystemRelationStateTableFilterMapper
 __construct (protected ilLanguage $lng, protected ilBuddySystemRelationState $state)
 
 optionsForState ()
 
 filterMatchesRelation (string $filter_key, ilBuddySystemRelation $relation)
 

Detailed Description

Member Function Documentation

◆ filterMatchesRelation()

ilBuddySystemRequestedRelationStateTableFilterMapper::filterMatchesRelation ( string  $filter_key,
ilBuddySystemRelation  $relation 
)

Implements ilBuddySystemRelationStateTableFilterMapper.

Definition at line 38 of file class.ilBuddySystemRequestedRelationStateTableFilterMapper.php.

References ilBuddySystemRelation\isOwnedByActor().

38  : bool
39  {
40  return (
41  (strtolower($filter_key) === strtolower($this->state::class . '_a') && $relation->isOwnedByActor()) ||
42  (strtolower($filter_key) === strtolower($this->state::class . '_p') && !$relation->isOwnedByActor())
43  );
44  }
+ Here is the call graph for this function:

◆ optionsForState()

ilBuddySystemRequestedRelationStateTableFilterMapper::optionsForState ( )
Returns
array<string, string> A map of options for a state, where the value is the translation and the key a unique key describing the state

Implements ilBuddySystemRelationStateTableFilterMapper.

Definition at line 23 of file class.ilBuddySystemRequestedRelationStateTableFilterMapper.php.

References ILIAS\Repository\lng().

23  : array
24  {
25  return [
26  $this->state::class . '_a' => $this->lng->txt(
27  'buddy_bs_state_' . strtolower($this->state->getName()) . '_filter_a'
28  ),
29  $this->state::class . '_p' => $this->lng->txt(
30  'buddy_bs_state_' . strtolower($this->state->getName()) . '_filter_p'
31  ),
32  ];
33  }
+ Here is the call graph for this function:

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