ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Exercise\Team\TeamMembersRetrieval Class Reference
+ Inheritance diagram for ILIAS\Exercise\Team\TeamMembersRetrieval:
+ Collaboration diagram for ILIAS\Exercise\Team\TeamMembersRetrieval:

Public Member Functions

 __construct (protected InternalDomainService $domain, protected \ilExAssignmentTeam $team, protected int $parent_ref_id, protected bool $edit_permission)
 
 getData (array $fields, ?Range $range=null, ?Order $order=null, array $filter=[], array $parameters=[])
 
 count (array $filter=[], array $parameters=[])
 
 isFieldNumeric (string $field)
 
 getData (array $fields, ?Range $range=null, ?Order $order=null, array $filter=[], array $parameters=[])
 
 count (array $filter, array $parameters)
 
 isFieldNumeric (string $field)
 

Protected Member Functions

 collectData ()
 

Detailed Description

Definition at line 29 of file TeamMembersRetrieval.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Exercise\Team\TeamMembersRetrieval::__construct ( protected InternalDomainService  $domain,
protected \ilExAssignmentTeam  $team,
protected int  $parent_ref_id,
protected bool  $edit_permission 
)

Definition at line 33 of file TeamMembersRetrieval.php.

38 {
39 }

Member Function Documentation

◆ collectData()

ILIAS\Exercise\Team\TeamMembersRetrieval::collectData ( )
protected

Definition at line 70 of file TeamMembersRetrieval.php.

70 : array
71 {
72 $access = $this->domain->access();
73 $data = [];
74
75 foreach ($this->team->getMembers() as $id) {
76 $access_warning = '';
77 if (!$access->checkAccessOfUser($id, 'read', '', $this->parent_ref_id) &&
78 is_array($info = $access->getInfo())) {
79 $access_warning = $info[0]['text'] ?? '';
80 }
81
82 $data[] = [
83 'id' => $id,
85 $id,
86 false,
87 false,
88 '',
89 $this->edit_permission
90 ),
91 'access_warning' => $access_warning
92 ];
93 }
94
95 return $data;
96 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is:
$info
Definition: entry_point.php:21
$data
Definition: storeScorm.php:45

References $data, $id, $info, and ilUserUtil\getNamePresentation().

+ Here is the call graph for this function:

◆ count()

ILIAS\Exercise\Team\TeamMembersRetrieval::count ( array  $filter = [],
array  $parameters = [] 
)

Implements ILIAS\Repository\RetrievalInterface.

Definition at line 58 of file TeamMembersRetrieval.php.

61 : int {
62 return count($this->collectData());
63 }
count(array $filter=[], array $parameters=[])

◆ getData()

ILIAS\Exercise\Team\TeamMembersRetrieval::getData ( array  $fields,
?Range  $range = null,
?Order  $order = null,
array  $filter = [],
array  $parameters = [] 
)

Implements ILIAS\Repository\RetrievalInterface.

Definition at line 41 of file TeamMembersRetrieval.php.

47 : \Generator {
48 $data = $this->collectData();
49 $order ??= new Order('name', Order::ASC);
50 $data = $this->applyOrder($data, $order);
51 $data = $this->applyRange($data, $range);
52
53 foreach ($data as $row) {
54 yield $row;
55 }
56 }
Both the subject and the direction need to be specified when expressing an order.
Definition: Order.php:29

◆ isFieldNumeric()

ILIAS\Exercise\Team\TeamMembersRetrieval::isFieldNumeric ( string  $field)

Implements ILIAS\Repository\RetrievalInterface.

Definition at line 65 of file TeamMembersRetrieval.php.

65 : bool
66 {
67 return $field === 'id';
68 }

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