ElggGroup Class Reference

Inheritance diagram for ElggGroup:
ElggEntity Friendable ElggData Notable Locatable Importable Loggable Exportable

List of all members.

Public Member Functions

 __construct ($guid=null)
 Construct a new group entity, optionally from a given guid value.
 addObjectToGroup (ElggObject $object)
 Add an ElggObject to this group.
 removeObjectFromGroup ($guid)
 Remove an object from the containing group.
 get ($name)
 Returns an attribute or metadata.
 addFriend ($friend_guid)
 Start friendable compatibility block:
 removeFriend ($friend_guid)
 For compatibility with Friendable.
 isFriend ()
 For compatibility with Friendable.
 isFriendsWith ($user_guid)
 For compatibility with Friendable.
 isFriendOf ($user_guid)
 For compatibility with Friendable.
 getFriends ($subtype="", $limit=10, $offset=0)
 For compatibility with Friendable.
 getFriendsOf ($subtype="", $limit=10, $offset=0)
 For compatibility with Friendable.
 getObjects ($subtype="", $limit=10, $offset=0)
 Get objects contained in this group.
 getFriendsObjects ($subtype="", $limit=10, $offset=0)
 For compatibility with Friendable.
 countObjects ($subtype="")
 For compatibility with Friendable.
 getMembers ($limit=10, $offset=0, $count=false)
 End friendable compatibility block.
 isPublicMembership ()
 Returns whether the current group is public membership or not.
 isMember ($user=null)
 Return whether a given user is a member of this group or not.
 join (ElggUser $user)
 Join an elgg user to this group.
 leave (ElggUser $user)
 Remove a user from the group.
 save ()
 Override the save function.
 getExportableValues ()
 Return an array of fields which can be exported.
 canComment ($user_guid=0)
 Can a user comment on this group?

Protected Member Functions

 initializeAttributes ()
 Sets the type to group.
 load ($guid)
 Load the ElggGroup data from the database.

Detailed Description

Definition at line 12 of file ElggGroup.php.


Constructor & Destructor Documentation

ElggGroup::__construct ( guid = null  ) 

Construct a new group entity, optionally from a given guid value.

Parameters:
mixed $guid If an int, load that GUID. If an entity table db row, then will load the rest of the data.
Exceptions:
IOException|InvalidParameterException if there was a problem creating the group.

Definition at line 37 of file ElggGroup.php.


Member Function Documentation

ElggGroup::addFriend ( friend_guid  ) 

Start friendable compatibility block:

public function addFriend($friend_guid); public function removeFriend($friend_guid); public function isFriend(); public function isFriendsWith($user_guid); public function isFriendOf($user_guid); public function getFriends($subtype = "", $limit = 10, $offset = 0); public function getFriendsOf($subtype = "", $limit = 10, $offset = 0); public function getObjects($subtype="", $limit = 10, $offset = 0); public function getFriendsObjects($subtype = "", $limit = 10, $offset = 0); public function countObjects($subtype = ""); For compatibility with Friendable.

Join a group when you friend ElggGroup.

Parameters:
int $friend_guid The GUID of the user joining the group.
Returns:
bool

Implements Friendable.

Definition at line 134 of file ElggGroup.php.

ElggGroup::addObjectToGroup ( ElggObject object  ) 

Add an ElggObject to this group.

Parameters:
ElggObject $object The object.
Returns:
bool

Definition at line 79 of file ElggGroup.php.

ElggGroup::canComment ( user_guid = 0  ) 

Can a user comment on this group?

See also:
ElggEntity::canComment()
Parameters:
int $user_guid User guid (default is logged in user)
Returns:
bool
Since:
1.8.0

Reimplemented from ElggEntity.

Definition at line 381 of file ElggGroup.php.

ElggGroup::countObjects ( subtype = ""  ) 

For compatibility with Friendable.

Parameters:
string $subtype Subtype of entities
Returns:
array|false

Implements Friendable.

Definition at line 245 of file ElggGroup.php.

ElggGroup::get ( name  ) 

Returns an attribute or metadata.

See also:
ElggEntity::get()
Parameters:
string $name Name
Returns:
mixed

Reimplemented from ElggEntity.

Definition at line 103 of file ElggGroup.php.

ElggGroup::getExportableValues (  ) 

Return an array of fields which can be exported.

Returns:
array

Reimplemented from ElggEntity.

Definition at line 365 of file ElggGroup.php.

ElggGroup::getFriends ( subtype = "",
limit = 10,
offset = 0 
)

For compatibility with Friendable.

Parameters:
string $subtype The GUID of a user to check.
int $limit Limit
int $offset Offset
Returns:
bool

Implements Friendable.

Definition at line 193 of file ElggGroup.php.

ElggGroup::getFriendsObjects ( subtype = "",
limit = 10,
offset = 0 
)

For compatibility with Friendable.

Parameters:
string $subtype Entity subtype
int $limit Limit
int $offset Offset
Returns:
array|false

Implements Friendable.

Definition at line 233 of file ElggGroup.php.

ElggGroup::getFriendsOf ( subtype = "",
limit = 10,
offset = 0 
)

For compatibility with Friendable.

Parameters:
string $subtype The GUID of a user to check.
int $limit Limit
int $offset Offset
Returns:
bool

Implements Friendable.

Definition at line 206 of file ElggGroup.php.

ElggGroup::getMembers ( limit = 10,
offset = 0,
count = false 
)

End friendable compatibility block.

Get a list of group members.

Parameters:
int $limit Limit
int $offset Offset
bool $count Count
Returns:
mixed

Definition at line 263 of file ElggGroup.php.

ElggGroup::getObjects ( subtype = "",
limit = 10,
offset = 0 
)

Get objects contained in this group.

Parameters:
string $subtype Entity subtype
int $limit Limit
int $offset Offset
Returns:
array|false

Implements Friendable.

Definition at line 219 of file ElggGroup.php.

ElggGroup::initializeAttributes (  )  [protected]

Sets the type to group.

Returns:
void

Reimplemented from ElggEntity.

Definition at line 20 of file ElggGroup.php.

ElggGroup::isFriend (  ) 

For compatibility with Friendable.

Friending a group adds you as a member

Returns:
bool

Implements Friendable.

Definition at line 158 of file ElggGroup.php.

ElggGroup::isFriendOf ( user_guid  ) 

For compatibility with Friendable.

Parameters:
int $user_guid The GUID of a user to check.
Returns:
bool

Implements Friendable.

Definition at line 180 of file ElggGroup.php.

ElggGroup::isFriendsWith ( user_guid  ) 

For compatibility with Friendable.

Parameters:
int $user_guid The GUID of a user to check.
Returns:
bool

Implements Friendable.

Definition at line 169 of file ElggGroup.php.

ElggGroup::isMember ( user = null  ) 

Return whether a given user is a member of this group or not.

Parameters:
ElggUser $user The user
Returns:
bool

Definition at line 287 of file ElggGroup.php.

ElggGroup::isPublicMembership (  ) 

Returns whether the current group is public membership or not.

Returns:
bool

Definition at line 272 of file ElggGroup.php.

ElggGroup::join ( ElggUser user  ) 

Join an elgg user to this group.

Parameters:
ElggUser $user User
Returns:
bool

Definition at line 304 of file ElggGroup.php.

ElggGroup::leave ( ElggUser user  ) 

Remove a user from the group.

Parameters:
ElggUser $user User
Returns:
bool

Definition at line 315 of file ElggGroup.php.

ElggGroup::load ( guid  )  [protected]

Load the ElggGroup data from the database.

Parameters:
mixed $guid GUID of an ElggGroup entity or database row from entity table
Returns:
bool

Reimplemented from ElggEntity.

Definition at line 326 of file ElggGroup.php.

ElggGroup::removeFriend ( friend_guid  ) 

For compatibility with Friendable.

Leave group when you unfriend ElggGroup.

Parameters:
int $friend_guid The GUID of the user leaving.
Returns:
bool

Implements Friendable.

Definition at line 147 of file ElggGroup.php.

ElggGroup::removeObjectFromGroup ( guid  ) 

Remove an object from the containing group.

Parameters:
int $guid The guid of the object.
Returns:
bool

Definition at line 90 of file ElggGroup.php.

ElggGroup::save (  ) 

Override the save function.

Returns:
bool

Reimplemented from ElggEntity.

Definition at line 348 of file ElggGroup.php.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations
Generated on Thu May 23 00:01:25 2013 for Elgg by  doxygen 1.6.3