Elgg  Version 4.x
Public Member Functions | Protected Attributes | List of all members
ElggRiverItem Class Reference

Public Member Functions

 __construct (\stdClass $row=null)
 Construct a river item object. More...
 
 __set (string $name, $value)
 {} More...
 
 __get ($name)
 {} More...
 
 getSubjectEntity ()
 Get the subject of this river item. More...
 
 getObjectEntity ()
 Get the object of this river item. More...
 
 getTargetEntity ()
 Get the target of this river item. More...
 
 getAnnotation ()
 Get the Annotation for this river item. More...
 
 getView ()
 Get the view used to display this river item. More...
 
 getTimePosted ()
 Get the time this activity was posted. More...
 
 getType ()
 Get the type of the object. More...
 
 getSubtype ()
 Get the subtype of the object. More...
 
 canDelete ($user_guid=0)
 Can a user delete this river item? More...
 
 delete ()
 Delete the river item. More...
 
 toObject ()
 Get a plain old object copy for public consumption. More...
 
 save ()
 Save the river item to the database. More...
 

Protected Attributes

const INTEGER_ATTR_NAMES
 

Detailed Description

Definition at line 16 of file ElggRiverItem.php.

Constructor & Destructor Documentation

ElggRiverItem::__construct ( \stdClass  $row = null)

Construct a river item object.

Parameters
\stdClass$row(optional) object obtained from database

Definition at line 36 of file ElggRiverItem.php.

Member Function Documentation

ElggRiverItem::__get (   $name)

{}

Definition at line 59 of file ElggRiverItem.php.

ElggRiverItem::__set ( string  $name,
  $value 
)

{}

Definition at line 52 of file ElggRiverItem.php.

ElggRiverItem::canDelete (   $user_guid = 0)

Can a user delete this river item?

Can be overridden by registering for the "permissions_check:delete", "river" plugin hook.

Parameters
int$user_guidThe user GUID, optionally (default: logged in user)
Returns
bool Whether this river item should be considered deletable by the given user.
Since
2.3

Definition at line 158 of file ElggRiverItem.php.

ElggRiverItem::delete ( )

Delete the river item.

Returns
bool False if the user lacks permission or the before event is cancelled
Since
2.3

Definition at line 168 of file ElggRiverItem.php.

ElggRiverItem::getAnnotation ( )

Get the Annotation for this river item.

Returns
|false

Definition at line 103 of file ElggRiverItem.php.

ElggRiverItem::getObjectEntity ( )

Get the object of this river item.

Returns

Definition at line 85 of file ElggRiverItem.php.

ElggRiverItem::getSubjectEntity ( )

Get the subject of this river item.

Returns

Definition at line 76 of file ElggRiverItem.php.

ElggRiverItem::getSubtype ( )

Get the subtype of the object.

This is required for elgg_view_list_item().

Returns
string 'item'

Definition at line 144 of file ElggRiverItem.php.

ElggRiverItem::getTargetEntity ( )

Get the target of this river item.

Returns

Definition at line 94 of file ElggRiverItem.php.

ElggRiverItem::getTimePosted ( )

Get the time this activity was posted.

Returns
int

Definition at line 121 of file ElggRiverItem.php.

ElggRiverItem::getType ( )

Get the type of the object.

This is required for elgg_view_list_item(). All the other data types (entities, extenders, relationships) have a type/subtype.

Returns
string 'river'

Definition at line 133 of file ElggRiverItem.php.

ElggRiverItem::getView ( )

Get the view used to display this river item.

Returns
string

Definition at line 112 of file ElggRiverItem.php.

ElggRiverItem::save ( )

Save the river item to the database.

Returns
bool

Definition at line 199 of file ElggRiverItem.php.

ElggRiverItem::toObject ( )

Get a plain old object copy for public consumption.

Returns

Definition at line 181 of file ElggRiverItem.php.

Member Data Documentation

const ElggRiverItem::INTEGER_ATTR_NAMES
protected
Initial value:
= [
'id',
'subject_guid',
'object_guid',
'target_guid',
'annotation_id',
'access_id',
'posted',
]

Definition at line 21 of file ElggRiverItem.php.


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