ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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.

@access public

Parameters
objectjson object

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

50 {
51 $this->json_obj = $json_obj;
52 $this->read();
53 }
read()
Read community entries and participants.

References $json_obj, and read().

+ Here is the call graph for this function:

Member Function Documentation

◆ getDescription()

ilECSCommunity::getDescription ( )

getDescription

@access public

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

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

References $description.

◆ getId()

ilECSCommunity::getId ( )

get id

@access public

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

124 {
125 return $this->id;
126 }

References $id.

Referenced by read().

+ 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.

92 {
93 $mids = array();
94 foreach($this->getParticipants() as $part)
95 {
96 $mids[] = $part->getMID();
97 }
98 return $mids;
99 }
getParticipants()
get participants

References getParticipants().

+ 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.

105 {
106 foreach($this->getParticipants() as $part)
107 {
108 if($part->isSelf())
109 {
110 return $part->getMID();
111 }
112 }
113 return 0;
114 }

References getParticipants().

+ Here is the call graph for this function:

◆ getParticipants()

ilECSCommunity::getParticipants ( )

get participants

@access public

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

84 {
85 return $this->participants ? $this->participants : array();
86 }

Referenced by getMids(), and getOwnId().

+ Here is the caller graph for this function:

◆ getTitle()

ilECSCommunity::getTitle ( )

get title

@access public

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

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

References $title.

◆ read()

ilECSCommunity::read ( )
private

Read community entries and participants.

@access private

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

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 }

References getId().

Referenced by __construct().

+ 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: