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

Public Member Functions

 optionsForState ()
 
 filterMatchesRelation (string $filter_key, ilBuddySystemRelation $relation)
 @inheritDoc More...
 
 text (ilBuddySystemRelation $relation)
 Returns the translation of the relation state, similar to the values of optionsForState. More...
 
- Public Member Functions inherited from ilAbstractBuddySystemRelationStateTableFilterMapper
 __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

Member Function Documentation

◆ filterMatchesRelation()

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

@inheritDoc

Reimplemented from ilAbstractBuddySystemRelationStateTableFilterMapper.

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

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 }
$relation

References $relation.

◆ 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

Reimplemented from ilAbstractBuddySystemRelationStateTableFilterMapper.

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

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 }

References ILIAS\Repository\lng().

Referenced by text().

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

◆ text()

ilBuddySystemRequestedRelationStateTableFilterMapper::text ( ilBuddySystemRelation  $relation)

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

Reimplemented from ilAbstractBuddySystemRelationStateTableFilterMapper.

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

46 : string
47 {
48 return $this->optionsForState()[$this->state::class . ($relation->isOwnedByActor() ? '_a' : '_p')];
49 }

References $relation, and optionsForState().

+ Here is the call graph for this function:

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