ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 120 of file class.ilECSCommunity.php.

References $id.

Referenced by read().

121  {
122  return $this->id;
123  }
+ 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  $mids[] = $part->getMID();
96  }
97  return $mids;
98  }
getParticipants()
get participants
+ Here is the call graph for this function:

◆ getOwnId()

ilECSCommunity::getOwnId ( )

Get own mid of community.

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

References getParticipants().

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

◆ getParticipants()

ilECSCommunity::getParticipants ( )

get participants

public

Returns

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 132 of file class.ilECSCommunity.php.

References getId().

Referenced by __construct().

133  {
134  $this->title = $this->json_obj->community->name;
135  $this->description = $this->json_obj->community->description;
136  $this->id = $this->json_obj->community->cid;
137 
138  foreach ($this->json_obj->participants as $participant) {
139  include_once('./Services/WebServices/ECS/classes/class.ilECSParticipant.php');
140  $this->participants[] = new ilECSParticipant($participant, $this->getId());
141  }
142  }
+ 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: