ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
ilMailMemberSearchDataProvider Class Reference

Class ilMailMemberSearchDataProvider. More...

+ Collaboration diagram for ilMailMemberSearchDataProvider:

Public Member Functions

 __construct ($objParticipants)
 
 getData ()
 

Protected Attributes

 $type = 'crs'
 
 $data = array()
 
 $objParticipants = null
 

Private Member Functions

 collectTableData ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMailMemberSearchDataProvider::__construct (   $objParticipants)
Parameters
$objParticipants

Definition at line 28 of file class.ilMailMemberSearchDataProvider.php.

References $objParticipants, and collectTableData().

29  {
30  $this->objParticipants = $objParticipants;
31  $this->type = $this->objParticipants->getType();
32  $this->collectTableData();
33  }
+ Here is the call graph for this function:

Member Function Documentation

◆ collectTableData()

ilMailMemberSearchDataProvider::collectTableData ( )
private

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

References $lng, ilObjUser\_lookupLogin(), and ilObjUser\_lookupName().

Referenced by __construct().

39  {
40  global $lng;
41 
42  $members = $this->objParticipants->getMembers();
43  $admins = $this->objParticipants->getAdmins();
44 
45  $participants['il_'.$this->type.'_member'] = $members;
46  $participants['il_'.$this->type.'_admin'] = $admins;
47  if($this->type == 'crs')
48  {
49  $tutors = $this->objParticipants->getTutors();
50  $participants['il_crs_tutor'] = $tutors;
51  }
52 
53  foreach($participants as $role => $users )
54  {
55  foreach($users as $user_id)
56  {
57  $name = ilObjUser::_lookupName($user_id);
58  $login = ilObjUser::_lookupLogin($user_id);
59  $fullname = $name['lastname'] . ', ' . $name['firstname'];
60 
61  $this->data[$fullname]['user_id'] = $user_id;
62  $this->data[$fullname]['login'] = $login;
63  $this->data[$fullname]['name'] = $fullname;
64  $this->data[$fullname]['role'] = $lng->txt($role);
65  }
66  }
67  }
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getData()

ilMailMemberSearchDataProvider::getData ( )
Returns
array

Definition at line 72 of file class.ilMailMemberSearchDataProvider.php.

References $data.

Field Documentation

◆ $data

ilMailMemberSearchDataProvider::$data = array()
protected

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

Referenced by getData().

◆ $objParticipants

ilMailMemberSearchDataProvider::$objParticipants = null
protected

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

Referenced by __construct().

◆ $type

ilMailMemberSearchDataProvider::$type = 'crs'
protected

Definition at line 15 of file class.ilMailMemberSearchDataProvider.php.


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