Public Member Functions | |||||||
| __construct ($guid=null) | |||||||
| Construct a new group entity, optionally from a given guid value. | |||||||
| getDisplayName () | |||||||
{Get the entity's display name.
| |||||||
| setDisplayName ($displayName) | |||||||
{Sets the title or name of this entity.
| |||||||
| 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 has open membership or not. | |||||||
| getContentAccessMode () | |||||||
| Return the content access mode used by group_gatekeeper(). | |||||||
| setContentAccessMode ($mode) | |||||||
| Set the content access mode used by group_gatekeeper(). | |||||||
| isMember ($user=null) | |||||||
| Is the given user a member of this group? | |||||||
| join (ElggUser $user) | |||||||
| Join a user to this group. | |||||||
| leave (ElggUser $user) | |||||||
| Remove a user from the group. | |||||||
| getExportableValues () | |||||||
| Return an array of fields which can be exported. | |||||||
| canComment ($user_guid=0) | |||||||
| Can a user comment on this group? | |||||||
Public Attributes | |||||||
| const | CONTENT_ACCESS_MODE_UNRESTRICTED = 'unrestricted' | ||||||
| const | CONTENT_ACCESS_MODE_MEMBERS_ONLY = 'members_only' | ||||||
Protected Member Functions | |||||||
| initializeAttributes () | |||||||
| Sets the type to group. | |||||||
| load ($guid) | |||||||
| Load the ElggGroup data from the database. | |||||||
| update () | |||||||
{Update the entity in the database.
| |||||||
| create () | |||||||
{Create a new entry in the entities table.Saves the base information in the entities table for the entity. Saving the type-specific information is handled in the calling class method.
| |||||||
| prepareObject ($object) | |||||||
{Prepare an object copy for toObject().
| |||||||
Definition at line 12 of file ElggGroup.php.
| ElggGroup::__construct | ( | $ | guid = null |
) |
Construct a new group entity, optionally from a given guid value.
| mixed | $guid If an int, load that GUID. If an entity table db row, then will load the rest of the data. |
| IOException|InvalidParameterException | if there was a problem creating the group. |
Definition at line 40 of file ElggGroup.php.
| 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.
| int | $friend_guid The GUID of the user joining the group. |
Implements Friendable.
Definition at line 152 of file ElggGroup.php.
| ElggGroup::addObjectToGroup | ( | ElggObject $ | object | ) |
Add an ElggObject to this group.
| ElggObject | $object The object. |
Definition at line 96 of file ElggGroup.php.
| ElggGroup::canComment | ( | $ | user_guid = 0 |
) |
Can a user comment on this group?
| int | $user_guid User guid (default is logged in user) |
Reimplemented from ElggEntity.
Definition at line 516 of file ElggGroup.php.
| ElggGroup::countObjects | ( | $ | subtype = "" |
) |
For compatibility with Friendable.
| string | $subtype Subtype of entities |
Implements Friendable.
Definition at line 283 of file ElggGroup.php.
| ElggGroup::create | ( | ) | [protected] |
{Create a new entry in the entities table.Saves the base information in the entities table for the entity. Saving the type-specific information is handled in the calling class method.
| InvalidParameterException | If the entity's type has not been set. | |
| IOException | If the new row fails to write to the DB. |
Reimplemented from ElggEntity.
Definition at line 461 of file ElggGroup.php.
| ElggGroup::get | ( | $ | name | ) |
Returns an attribute or metadata.
| string | $name Name |
Reimplemented from ElggEntity.
Definition at line 120 of file ElggGroup.php.
| ElggGroup::getContentAccessMode | ( | ) |
Return the content access mode used by group_gatekeeper().
Definition at line 321 of file ElggGroup.php.
| ElggGroup::getDisplayName | ( | ) |
{Get the entity's display name.
Reimplemented from ElggEntity.
Definition at line 78 of file ElggGroup.php.
| ElggGroup::getExportableValues | ( | ) |
Return an array of fields which can be exported.
Reimplemented from ElggEntity.
Definition at line 500 of file ElggGroup.php.
| ElggGroup::getFriends | ( | $ | subtype = "", |
|
| $ | limit = 10, |
|||
| $ | offset = 0 | |||
| ) |
For compatibility with Friendable.
| string | $subtype The GUID of a user to check. | |
| int | $limit Limit | |
| int | $offset Offset |
Implements Friendable.
Definition at line 225 of file ElggGroup.php.
| ElggGroup::getFriendsObjects | ( | $ | subtype = "", |
|
| $ | limit = 10, |
|||
| $ | offset = 0 | |||
| ) |
For compatibility with Friendable.
| string | $subtype Entity subtype | |
| int | $limit Limit | |
| int | $offset Offset |
Implements Friendable.
Definition at line 270 of file ElggGroup.php.
| ElggGroup::getFriendsOf | ( | $ | subtype = "", |
|
| $ | limit = 10, |
|||
| $ | offset = 0 | |||
| ) |
For compatibility with Friendable.
| string | $subtype The GUID of a user to check. | |
| int | $limit Limit | |
| int | $offset Offset |
Implements Friendable.
Definition at line 240 of file ElggGroup.php.
| ElggGroup::getMembers | ( | $ | limit = 10, |
|
| $ | offset = 0, |
|||
| $ | count = false | |||
| ) |
End friendable compatibility block.
Get a list of group members.
| int | $limit Limit | |
| int | $offset Offset | |
| bool | $count Count |
Definition at line 301 of file ElggGroup.php.
| ElggGroup::getObjects | ( | $ | subtype = "", |
|
| $ | limit = 10, |
|||
| $ | offset = 0 | |||
| ) |
Get objects contained in this group.
| string | $subtype Entity subtype | |
| int | $limit Limit | |
| int | $offset Offset |
Implements Friendable.
Definition at line 255 of file ElggGroup.php.
| ElggGroup::initializeAttributes | ( | ) | [protected] |
Sets the type to group.
Reimplemented from ElggEntity.
Definition at line 23 of file ElggGroup.php.
| ElggGroup::isFriend | ( | ) |
For compatibility with Friendable.
Friending a group adds you as a member
Implements Friendable.
Definition at line 182 of file ElggGroup.php.
| ElggGroup::isFriendOf | ( | $ | user_guid | ) |
For compatibility with Friendable.
| int | $user_guid The GUID of a user to check. |
Implements Friendable.
Definition at line 209 of file ElggGroup.php.
| ElggGroup::isFriendsWith | ( | $ | user_guid | ) |
For compatibility with Friendable.
| int | $user_guid The GUID of a user to check. |
Implements Friendable.
Definition at line 195 of file ElggGroup.php.
| ElggGroup::isMember | ( | $ | user = null |
) |
Is the given user a member of this group?
| ElggUser | $user The user. Default is logged in user. |
Definition at line 365 of file ElggGroup.php.
| ElggGroup::isPublicMembership | ( | ) |
Returns whether the current group has open membership or not.
Definition at line 310 of file ElggGroup.php.
| ElggGroup::join | ( | ElggUser $ | user | ) |
Join a user to this group.
| ElggUser | $user User joining the group. |
Definition at line 388 of file ElggGroup.php.
| ElggGroup::leave | ( | ElggUser $ | user | ) |
Remove a user from the group.
| ElggUser | $user User to remove from the group. |
Definition at line 406 of file ElggGroup.php.
| ElggGroup::load | ( | $ | guid | ) | [protected] |
Load the ElggGroup data from the database.
| mixed | $guid GUID of an ElggGroup entity or database row from entity table |
Reimplemented from ElggEntity.
Definition at line 421 of file ElggGroup.php.
| ElggGroup::prepareObject | ( | $ | object | ) | [protected] |
{Prepare an object copy for toObject().
| stdClass | $object Object representation of the entity |
Reimplemented from ElggEntity.
Definition at line 483 of file ElggGroup.php.
| ElggGroup::removeFriend | ( | $ | friend_guid | ) |
For compatibility with Friendable.
Leave group when you unfriend ElggGroup.
| int | $friend_guid The GUID of the user leaving. |
Implements Friendable.
Definition at line 168 of file ElggGroup.php.
| ElggGroup::removeObjectFromGroup | ( | $ | guid | ) |
Remove an object from the containing group.
| int | $guid The guid of the object. |
Definition at line 107 of file ElggGroup.php.
| ElggGroup::setContentAccessMode | ( | $ | mode | ) |
Set the content access mode used by group_gatekeeper().
| string | $mode One of CONTENT_ACCESS_MODE_* constants |
Definition at line 349 of file ElggGroup.php.
| ElggGroup::setDisplayName | ( | $ | displayName | ) |
{Sets the title or name of this entity.
| string | $displayName The title or name of this entity. |
Reimplemented from ElggEntity.
Definition at line 85 of file ElggGroup.php.
| ElggGroup::update | ( | ) | [protected] |
{Update the entity in the database.
Reimplemented from ElggEntity.
Definition at line 441 of file ElggGroup.php.
| const ElggGroup::CONTENT_ACCESS_MODE_MEMBERS_ONLY = 'members_only' |
Definition at line 16 of file ElggGroup.php.
| const ElggGroup::CONTENT_ACCESS_MODE_UNRESTRICTED = 'unrestricted' |
Definition at line 15 of file ElggGroup.php.
1.6.3