ILIAS  release_8 Revision v8.24
ilBuddySystemRequestedRelationStateTableFilterMapper Class Reference
+ Inheritance diagram for ilBuddySystemRequestedRelationStateTableFilterMapper:
+ Collaboration diagram for ilBuddySystemRequestedRelationStateTableFilterMapper:

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from ilAbstractBuddySystemRelationStateTableFilterMapper
 $lng
 
 $state
 

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(get_class($this->state) . '_a') && $relation->isOwnedByActor()) ||
42 (strtolower($filter_key) === strtolower(get_class($this->state) . '_p') && !$relation->isOwnedByActor())
43 );
44 }

References ilBuddySystemRelation\isOwnedByActor().

+ 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

Reimplemented from ilAbstractBuddySystemRelationStateTableFilterMapper.

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

23 : array
24 {
25 return [
26 get_class($this->state) . '_a' => $this->lng->txt(
27 'buddy_bs_state_' . strtolower($this->state->getName()) . '_filter_a'
28 ),
29 get_class($this->state) . '_p' => $this->lng->txt(
30 'buddy_bs_state_' . strtolower($this->state->getName()) . '_filter_p'
31 ),
32 ];
33 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

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