Overview

Packages

  • ClipIt
    • clipit
      • api
    • urjc
      • backend
  • Elgg
    • Core
      • Access
      • Authentication
      • Cache
      • Caches
      • Core
      • DataMode
        • Site
      • DataModel
        • Annotations
        • Entities
        • Extender
        • File
        • Importable
        • Loggable
        • Notable
        • Object
        • User
      • DataStorage
      • Exception
      • Exceptions
        • Stub
      • FileStore
        • Disk
      • Groups
      • Helpers
      • HMAC
      • Memcache
      • Metadata
      • Navigation
      • ODD
      • Output
      • Plugins
        • Settings
      • Sessions
      • SocialModel
        • Friendable
        • Locatable
      • WebServicesAPI
      • Widgets
      • XML
      • XMLRPC
    • Exceptions
      • Stub
  • None
  • PHP

Classes

  • ElggGroup
  • ElggGroupItemVisibility
  • Overview
  • Package
  • Class
  • Tree

Class ElggGroup

Class representing a container for other elgg entities.

ElggData implements Loggable, Iterator, ArrayAccess, Exportable
Extended by ElggEntity implements Notable, Locatable, Importable
Extended by ElggGroup implements Friendable
Package: Elgg\Core\Groups
Located at ElggGroup.php
Methods summary
protected
# initializeAttributes( )

Sets the type to group.

Sets the type to group.

Overrides

ElggEntity::initializeAttributes()
public
# __construct( mixed $guid = null )

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

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

Parameters

$guid
mixed
$guid If an int, load that GUID. If an entity table db row, then will load the rest of the data.

Throws

IOException|InvalidParameterException
if there was a problem creating the group.
public boolean
# addObjectToGroup( ElggObject $object )

Add an ElggObject to this group.

Add an ElggObject to this group.

Parameters

$object
ElggObject
$object The object.

Returns

boolean
public boolean
# removeObjectFromGroup( integer $guid )

Remove an object from the containing group.

Remove an object from the containing group.

Parameters

$guid
integer
$guid The guid of the object.

Returns

boolean
public mixed
# get( string $name )

Returns an attribute or metadata.

Returns an attribute or metadata.

Parameters

$name
string
$name Name

Returns

mixed

See

ElggEntity::get()

Overrides

ElggEntity::get()
public boolean
# addFriend( integer $friend_guid )

For compatibility with Friendable.

For compatibility with Friendable.

Join a group when you friend ElggGroup.

Parameters

$friend_guid
integer
$friend_guid The GUID of the user joining the group.

Returns

boolean

Implementation of

Friendable::addFriend()
public boolean
# removeFriend( integer $friend_guid )

For compatibility with Friendable

For compatibility with Friendable

Leave group when you unfriend ElggGroup.

Parameters

$friend_guid
integer
$friend_guid The GUID of the user leaving.

Returns

boolean

Implementation of

Friendable::removeFriend()
public boolean
# isFriend( )

For compatibility with Friendable

For compatibility with Friendable

Friending a group adds you as a member

Returns

boolean

Implementation of

Friendable::isFriend()
public boolean
# isFriendsWith( integer $user_guid )

For compatibility with Friendable

For compatibility with Friendable

Parameters

$user_guid
integer
$user_guid The GUID of a user to check.

Returns

boolean

Implementation of

Friendable::isFriendsWith()
public boolean
# isFriendOf( integer $user_guid )

For compatibility with Friendable

For compatibility with Friendable

Parameters

$user_guid
integer
$user_guid The GUID of a user to check.

Returns

boolean

Implementation of

Friendable::isFriendOf()
public boolean
# getFriends( string $subtype = "", integer $limit = 10, integer $offset = 0 )

For compatibility with Friendable

For compatibility with Friendable

Parameters

$subtype
string
$subtype The GUID of a user to check.
$limit
integer
$limit Limit
$offset
integer
$offset Offset

Returns

boolean

Implementation of

Friendable::getFriends()
public boolean
# getFriendsOf( string $subtype = "", integer $limit = 10, integer $offset = 0 )

For compatibility with Friendable

For compatibility with Friendable

Parameters

$subtype
string
$subtype The GUID of a user to check.
$limit
integer
$limit Limit
$offset
integer
$offset Offset

Returns

boolean

Implementation of

Friendable::getFriendsOf()
public array|false
# getObjects( string $subtype = "", integer $limit = 10, integer $offset = 0 )

Get objects contained in this group.

Get objects contained in this group.

Parameters

$subtype
string
$subtype Entity subtype
$limit
integer
$limit Limit
$offset
integer
$offset Offset

Returns

array|false

Implementation of

Friendable::getObjects()
public array|false
# getFriendsObjects( string $subtype = "", integer $limit = 10, integer $offset = 0 )

For compatibility with Friendable

For compatibility with Friendable

Parameters

$subtype
string
$subtype Entity subtype
$limit
integer
$limit Limit
$offset
integer
$offset Offset

Returns

array|false

Implementation of

Friendable::getFriendsObjects()
public array|false
# countObjects( string $subtype = "" )

For compatibility with Friendable

For compatibility with Friendable

Parameters

$subtype
string
$subtype Subtype of entities

Returns

array|false

Implementation of

Friendable::countObjects()
public mixed
# getMembers( integer $limit = 10, integer $offset = 0, boolean $count = false )

Get a list of group members.

Get a list of group members.

Parameters

$limit
integer
$limit Limit
$offset
integer
$offset Offset
$count
boolean
$count Count

Returns

mixed
public boolean
# isPublicMembership( )

Returns whether the current group is public membership or not.

Returns whether the current group is public membership or not.

Returns

boolean
public boolean
# isMember( ElggUser $user = null )

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

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

Parameters

$user
ElggUser
$user The user

Returns

boolean
public boolean
# join( ElggUser $user )

Join an elgg user to this group.

Join an elgg user to this group.

Parameters

$user
ElggUser
$user User

Returns

boolean
public boolean
# leave( ElggUser $user )

Remove a user from the group.

Remove a user from the group.

Parameters

$user
ElggUser
$user User

Returns

boolean
protected boolean
# load( mixed $guid )

Load the ElggGroup data from the database

Load the ElggGroup data from the database

Parameters

$guid
mixed
$guid GUID of an ElggGroup entity or database row from entity table

Returns

boolean

Overrides

ElggEntity::load()
public boolean
# save( )

Override the save function.

Override the save function.

Returns

boolean

Throws

IOException

Overrides

ElggEntity::save()
public array
# getExportableValues( )

Return an array of fields which can be exported.

Return an array of fields which can be exported.

Returns

array

Overrides

ElggEntity::getExportableValues()
public boolean
# canComment( integer $user_guid = 0 )

Can a user comment on this group?

Can a user comment on this group?

Parameters

$user_guid
integer
$user_guid User guid (default is logged in user)

Returns

boolean

Since

1.8.0

See

ElggEntity::canComment()

Overrides

ElggEntity::canComment()
Methods inherited from ElggEntity
__clone(), __unset(), addRelationship(), annotate(), canAnnotate(), canEdit(), canEditMetadata(), canWriteToContainer(), countAnnotations(), countComments(), countEntitiesFromRelationship(), delete(), deleteAnnotations(), deleteMetadata(), deleteOwnedAnnotations(), deleteOwnedMetadata(), deleteRelationships(), disable(), disableAnnotations(), disableMetadata(), enable(), enableAnnotations(), enableMetadata(), export(), getAccessID(), getAnnotations(), getAnnotationsAvg(), getAnnotationsMax(), getAnnotationsMin(), getAnnotationsSum(), getCalendarEndTime(), getCalendarStartTime(), getContainerEntity(), getContainerGUID(), getEntitiesFromRelationship(), getGUID(), getIconURL(), getLatitude(), getLocation(), getLongitude(), getMetaData(), getObjectFromID(), getOwnerEntity(), getOwnerGUID(), getPrivateSetting(), getSubtype(), getSystemLogID(), getTags(), getTimeUpdated(), getType(), getURL(), getVolatileData(), import(), isEnabled(), isFullyLoaded(), removePrivateSetting(), removeRelationship(), set(), setCalendarTimeAndDuration(), setContainerGUID(), setLatLong(), setLocation(), setMetaData(), setPrivateSetting(), setURL(), setVolatileData()
Methods inherited from ElggData
__get(), __isset(), __set(), current(), getClassName(), getTimeCreated(), key(), next(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), rewind(), valid()
Properties inherited from ElggEntity
$icon_override, $temp_annotations, $temp_metadata, $temp_private_settings, $url_override, $volatile
Properties inherited from ElggData
$attributes, $valid
Magic properties summary
public string $name
#

A short name that captures the purpose of the group

A short name that captures the purpose of the group

public string $description
#

A longer body of content that gives more details about the group

A longer body of content that gives more details about the group

Magic properties inherited from ElggEntity
$access_id, $container_guid, $enabled, $guid, $owner_guid, $site_guid, $subtype, $time_created, $time_updated, $type
API documentation generated by ApiGen 2.8.0