OPEN SOURCE SOCIAL NETWORK 6.6
Loading...
Searching...
No Matches
OssnGroup Class Reference
Inheritance diagram for OssnGroup:
OssnObject OssnEntities OssnDatabase OssnBase OssnSession

Public Member Functions

 initAttributes ()
 
 createGroup ($params)
 
 getGuid ()
 
 getUserGroups ($owner_guid, $params=array())
 
 getGroup ($guid)
 
 updateGroup ($name, $description, $guid)
 
 changeOwner ($owner, $guid)
 
 deleteGroup ($guid)
 
 countRequests ()
 
 getMembersRequests ()
 
 isMember ($group, $user)
 
 getMembers ($count=false)
 
 sendRequest ($from, $group)
 
 requestExists ($from, $group)
 
 approveRequest ($from, $group)
 
 deleteMember ($from, $group)
 
 searchGroups ($q, array $args=array())
 
 UploadCover ()
 
 ResetCoverPostition ($guid)
 
 haveCover ()
 
 groupCovers ()
 
 coverURL ()
 
 repositionCOVER ($guid, $top, $left)
 
 coverParameters ($guid)
 
 getMyGroups ($user)
 
 isModerator ($user_guid)
 
 getPhotoFile ()
 
- Public Member Functions inherited from OssnObject
 __construct ($guid=0)
 
 initAttributes ()
 
 addObject ()
 
 getObjectById (array $options=array())
 
 getObjectId ()
 
 updateObject ($name, $value, $guid)
 
 deleteObject ($object='')
 
 searchObject (array $params=array())
 
 save ()
 
- Public Member Functions inherited from OssnEntities
 add ()
 
 get_entity ()
 
 save ()
 
 get_entities ()
 
 AddedEntityGuid ()
 
 updateEntity ()
 
 deleteByOwnerGuid ($guid, $type)
 
 deleteEntity ($guid='')
 
 searchEntities (array $params=array())
 
 canChange ($user='')
 
 destruct ()
 
- Public Member Functions inherited from OssnDatabase
 __construct ()
 
 Connect ()
 
 insert ($params)
 
 statement ($query)
 
 execute ($values=array())
 
 update ($params=array())
 
 select ($params, $multi='')
 
 fetch ($data=false)
 
 delete ($params)
 
 getLastEntry ()
 
 constructWheres (array $array, $operator="AND")
 
 generateLimit ($data_limit=false, $page_limit=false, $offset=false)
 
 clearVars ()
 
 __destruct ()
 
- Public Member Functions inherited from OssnBase
 getGUID ()
 
 getID ()
 
 getParam ($param)
 
 isParam ($param)
 
 __call ($method, $args)
 

Additional Inherited Members

- Static Public Member Functions inherited from OssnSession
static start ()
 
static assign ($name='', $value='')
 
static unassign ($name='')
 
static isSession ($name='')
 
static getSession ($name='')
 

Member Function Documentation

◆ approveRequest()

approveRequest (   $from,
  $group 
)

Approve member request

@params $from Member guid $group Group guid

Returns
bool;

◆ changeOwner()

changeOwner (   $owner,
  $guid 
)

Change owner of group

@params $owner Group new owner guid $guid Group guid

Returns
bool;

◆ countRequests()

countRequests ( )

Count member requests

Returns
int;

◆ coverParameters()

coverParameters (   $guid)

Get cover position params

Parameters
int$guidGroup guid
Returns
array; @access public;

◆ coverURL()

coverURL ( )

Get group latest cover url

Returns
url; @access public;

◆ createGroup()

createGroup (   $params)

Create group

@params $params['name'] Name of group $params['description'] Group description $params['owner_guid']: Guid of owner creating group $params['privacy'] Group Privacy

Returns
bool;

◆ deleteGroup()

deleteGroup (   $guid)

Delete group

@params $guid Group guid

Returns
bool;

◆ deleteMember()

deleteMember (   $from,
  $group 
)

Delete member from group

@params $from Member guid $group Group guid

Returns
bool;

◆ getGroup()

getGroup (   $guid)

Get group by guid

@params $guid group guid

Returns
object;

◆ getGuid()

getGuid ( )

Get guid of newly created group

Returns
int; @access public;

◆ getMembers()

getMembers (   $count = false)

Get group members

@params $object->guid Group guid

Returns
object;

◆ getMembersRequests()

getMembersRequests ( )

Get group member requests

@params $object->guid Group guid

Returns
object;

◆ getMyGroups()

getMyGroups (   $user)

Get user groups (owned groups and groups user member of)

Parameters
object$userUser entity
Returns
array

◆ getPhotoFile()

getPhotoFile ( )

Get group cover photo file

Returns
string|object

◆ getUserGroups()

getUserGroups (   $owner_guid,
  $params = array() 
)

Get User groups

Parameters
integer$owner_guidGuid of owner creating group
array$paramsExtra options
Returns
object;

◆ groupCovers()

groupCovers ( )

Get group covers

Returns
object; @access public;

◆ haveCover()

haveCover ( )

Check if group have cover or not

Returns
bool; @access private;

◆ initAttributes()

initAttributes ( )

Initialize the object.

Returns
void;

Reimplemented from OssnObject.

◆ isMember()

isMember (   $group,
  $user 
)

Cehck if the user is memeber of group or not

@params $user User guid $group Group guid

Returns
bool;

◆ isModerator()

isModerator (   $user_guid)

isModerator check if user is group moderator

Returns
boolean

◆ repositionCOVER()

repositionCOVER (   $guid,
  $top,
  $left 
)

Reposition group cover

Parameters
$guidGroup guid $top Position from top $left Position from left
Returns
bool; @access public;

◆ requestExists()

requestExists (   $from,
  $group 
)

Check if member request exist or not

@params $from Member guid $group Group guid

Returns
bool;

◆ ResetCoverPostition()

ResetCoverPostition (   $guid)

Reset cover position

Parameters
$guidGroup guid
Returns
bool; @access private;

◆ searchGroups()

searchGroups (   $q,
array  $args = array() 
)

Search group in database

@params $q Group Metadata

Returns
object;

◆ sendRequest()

sendRequest (   $from,
  $group 
)

Send group join request

@params $from Member guid $group Group guid

Returns
bool;

◆ updateGroup()

updateGroup (   $name,
  $description,
  $guid 
)

Upgrade group

@params $name Group name $description Group description $guid Group guid

Returns
bool;

◆ UploadCover()

UploadCover ( )

Upload group cover

Returns
boolean|null @access public;

The documentation for this class was generated from the following file: