PHP Class ElggRiverItem, Elgg

Show file Open project: elgg/elgg Class Usage Examples

Public Properties

Property Type Description
$access_id
$action_type
$annotation_id
$enabled
$id
$object_guid
$posted
$subject_guid
$subtype
$target_guid
$type
$view

Public Methods

Method Description
__construct ( stdClass $object ) Construct a river item object given a database row.
canDelete ( integer $user_guid ) : boolean Can a user delete this river item?
delete ( ) : boolean Delete the river item
getAnnotation ( ) : ElggAnnotation Get the Annotation for this river item
getObjectEntity ( ) : ElggEntity Get the object of this river item
getSubjectEntity ( ) : ElggEntity Get the subject of this river item
getSubtype ( ) : string Get the subtype of the object
getTargetEntity ( ) : ElggEntity Get the target of this river item
getTimePosted ( ) : integer Get the time this activity was posted
getType ( ) : string Get the type of the object
getView ( ) : string Get the view used to display this river item
toObject ( ) : stdClass Get a plain old object copy for public consumption

Method Details

__construct() public method

Construct a river item object given a database row.
public __construct ( stdClass $object )
$object stdClass Object obtained from database

canDelete() public method

Can a user delete this river item?
Since: 2.3
public canDelete ( integer $user_guid ) : boolean
$user_guid integer The user GUID, optionally (default: logged in user)
return boolean Whether this river item should be considered deletable by the given user.

delete() public method

Delete the river item
Since: 2.3
public delete ( ) : boolean
return boolean False if the user lacks permission or the before event is cancelled

getAnnotation() public method

Get the Annotation for this river item
public getAnnotation ( ) : ElggAnnotation
return ElggAnnotation

getObjectEntity() public method

Get the object of this river item
public getObjectEntity ( ) : ElggEntity
return ElggEntity

getSubjectEntity() public method

Get the subject of this river item
public getSubjectEntity ( ) : ElggEntity
return ElggEntity

getSubtype() public method

This is required for elgg_view_list_item().
public getSubtype ( ) : string
return string 'item'

getTargetEntity() public method

Get the target of this river item
public getTargetEntity ( ) : ElggEntity
return ElggEntity

getTimePosted() public method

Get the time this activity was posted
public getTimePosted ( ) : integer
return integer

getType() public method

This is required for elgg_view_list_item(). All the other data types (entities, extenders, relationships) have a type/subtype.
public getType ( ) : string
return string 'river'

getView() public method

Get the view used to display this river item
public getView ( ) : string
return string

toObject() public method

Get a plain old object copy for public consumption
public toObject ( ) : stdClass
return stdClass

Property Details

$access_id public property

public $access_id

$action_type public property

public $action_type

$annotation_id public property

public $annotation_id

$enabled public property

public $enabled

$id public property

public $id

$object_guid public property

public $object_guid

$posted public property

public $posted

$subject_guid public property

public $subject_guid

$subtype public property

public $subtype

$target_guid public property

public $target_guid

$type public property

public $type

$view public property

public $view