ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilBuddySystemRequestedRelationStateTableFilterMapper Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ 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 (ilLanguage $lng, ilBuddySystemRelationState $state)
 
 optionsForState ()
 
 filterMatchesRelation (string $filter_key, ilBuddySystemRelation $relation)
 

Additional Inherited Members

- Protected Attributes inherited from ilAbstractBuddySystemRelationStateTableFilterMapper
 $lng
 
 $state
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Member Function Documentation

◆ filterMatchesRelation()

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

Implements ilBuddySystemRelationStateTableFilterMapper.

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

References ilBuddySystemRelation\isOwnedByActor().

36  : bool
37  {
38  return (
39  (strtolower($filter_key) === strtolower(get_class($this->state) . '_a') && $relation->isOwnedByActor()) ||
40  (strtolower($filter_key) === strtolower(get_class($this->state) . '_p') && !$relation->isOwnedByActor())
41  );
42  }
+ 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 21 of file class.ilBuddySystemRequestedRelationStateTableFilterMapper.php.

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

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