ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilECSCommunity Class Reference
+ Collaboration diagram for ilECSCommunity:

Public Member Functions

 __construct ($json_obj)
 Constructor. More...
 
 getTitle ()
 get title More...
 
 getDescription ()
 getDescription More...
 
 getParticipants ()
 get participants More...
 
 getMids ()
 Get array of mids of all participants. More...
 
 getOwnId ()
 Get own mid of community. More...
 
 getId ()
 get id More...
 

Protected Attributes

 $json_obj = null
 
 $title = ''
 
 $description = ''
 
 $id = 0
 
 $participants = array()
 
 $position = 0
 

Private Member Functions

 read ()
 Read community entries and participants. More...
 

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 32 of file class.ilECSCommunity.php.

Constructor & Destructor Documentation

◆ __construct()

ilECSCommunity::__construct (   $json_obj)

Constructor.

public

Parameters
objectjson object

Definition at line 49 of file class.ilECSCommunity.php.

References $json_obj, and read().

50  {
51  $this->json_obj = $json_obj;
52  $this->read();
53  }
read()
Read community entries and participants.
+ Here is the call graph for this function:

Member Function Documentation

◆ getDescription()

ilECSCommunity::getDescription ( )

getDescription

public

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

References $description.

73  {
74  return $this->description;
75  }

◆ getId()

ilECSCommunity::getId ( )

get id

public

Definition at line 123 of file class.ilECSCommunity.php.

References $id.

Referenced by read().

124  {
125  return $this->id;
126  }
+ Here is the caller graph for this function:

◆ getMids()

ilECSCommunity::getMids ( )

Get array of mids of all participants.

Definition at line 91 of file class.ilECSCommunity.php.

References getParticipants().

92  {
93  $mids = array();
94  foreach($this->getParticipants() as $part)
95  {
96  $mids[] = $part->getMID();
97  }
98  return $mids;
99  }
getParticipants()
get participants
+ Here is the call graph for this function:

◆ getOwnId()

ilECSCommunity::getOwnId ( )

Get own mid of community.

Definition at line 104 of file class.ilECSCommunity.php.

References getParticipants().

105  {
106  foreach($this->getParticipants() as $part)
107  {
108  if($part->isSelf())
109  {
110  return $part->getMID();
111  }
112  }
113  return 0;
114  }
getParticipants()
get participants
+ Here is the call graph for this function:

◆ getParticipants()

ilECSCommunity::getParticipants ( )

get participants

public

Definition at line 83 of file class.ilECSCommunity.php.

Referenced by getMids(), and getOwnId().

84  {
85  return $this->participants ? $this->participants : array();
86  }
+ Here is the caller graph for this function:

◆ getTitle()

ilECSCommunity::getTitle ( )

get title

public

Definition at line 61 of file class.ilECSCommunity.php.

References $title.

62  {
63  return $this->title;
64  }

◆ read()

ilECSCommunity::read ( )
private

Read community entries and participants.

private

Definition at line 135 of file class.ilECSCommunity.php.

References getId().

Referenced by __construct().

136  {
137  $this->title = $this->json_obj->community->name;
138  $this->description = $this->json_obj->community->description;
139  $this->id = $this->json_obj->community->cid;
140 
141  foreach($this->json_obj->participants as $participant)
142  {
143  include_once('./Services/WebServices/ECS/classes/class.ilECSParticipant.php');
144  $this->participants[] = new ilECSParticipant($participant,$this->getId());
145  }
146  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $description

ilECSCommunity::$description = ''
protected

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

Referenced by getDescription().

◆ $id

ilECSCommunity::$id = 0
protected

Definition at line 37 of file class.ilECSCommunity.php.

Referenced by getId().

◆ $json_obj

ilECSCommunity::$json_obj = null
protected

Definition at line 34 of file class.ilECSCommunity.php.

Referenced by __construct().

◆ $participants

ilECSCommunity::$participants = array()
protected

Definition at line 39 of file class.ilECSCommunity.php.

◆ $position

ilECSCommunity::$position = 0
protected

Definition at line 40 of file class.ilECSCommunity.php.

◆ $title

ilECSCommunity::$title = ''
protected

Definition at line 35 of file class.ilECSCommunity.php.

Referenced by getTitle().


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