ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAbstractBuddySystemRelationStateTableFilterMapper Class Reference
+ Inheritance diagram for ilAbstractBuddySystemRelationStateTableFilterMapper:
+ Collaboration diagram for ilAbstractBuddySystemRelationStateTableFilterMapper:

Public Member Functions

 __construct (protected ilLanguage $lng, protected ilBuddySystemRelationState $state)
 
 optionsForState ()
 
 filterMatchesRelation (string $filter_key, ilBuddySystemRelation $relation)
 
 text (ilBuddySystemRelation $relation)
 Returns the translation of the relation state, similar to the values of optionsForState. More...
 
 optionsForState ()
 
 filterMatchesRelation (string $filter_key, ilBuddySystemRelation $relation)
 
 text (ilBuddySystemRelation $relation)
 Returns the translation of the relation state, similar to the values of optionsForState. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAbstractBuddySystemRelationStateTableFilterMapper::__construct ( protected ilLanguage  $lng,
protected ilBuddySystemRelationState  $state 
)
final

Member Function Documentation

◆ filterMatchesRelation()

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

Implements ilBuddySystemRelationStateTableFilterMapper.

Reimplemented in ilBuddySystemIgnoredRequestRelationStateTableFilterMapper, and ilBuddySystemRequestedRelationStateTableFilterMapper.

Definition at line 34 of file class.ilAbstractBuddySystemRelationStateTableFilterMapper.php.

34 : bool
35 {
36 return (
37 strtolower($filter_key) === strtolower($this->state::class)
38 );
39 }

◆ optionsForState()

ilAbstractBuddySystemRelationStateTableFilterMapper::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.

Reimplemented in ilBuddySystemRequestedRelationStateTableFilterMapper.

Definition at line 27 of file class.ilAbstractBuddySystemRelationStateTableFilterMapper.php.

27 : array
28 {
29 return [
30 $this->state::class => $this->lng->txt('buddy_bs_state_' . strtolower($this->state->getName()))
31 ];
32 }

References ILIAS\Repository\lng().

Referenced by text(), and ilBuddySystemIgnoredRequestRelationStateTableFilterMapper\text().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ text()

ilAbstractBuddySystemRelationStateTableFilterMapper::text ( ilBuddySystemRelation  $relation)

Returns the translation of the relation state, similar to the values of optionsForState.

Implements ilBuddySystemRelationStateTableFilterMapper.

Reimplemented in ilBuddySystemIgnoredRequestRelationStateTableFilterMapper, and ilBuddySystemRequestedRelationStateTableFilterMapper.

Definition at line 41 of file class.ilAbstractBuddySystemRelationStateTableFilterMapper.php.

References optionsForState().

+ Here is the call graph for this function:

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