Elgg  Version master
Public Member Functions | Protected 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...
 
 __isset ($name)
 {} More...
 
 __unset ($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...
 
 updateLastAction (int $last_action=null)
 Update the last_action column in the river table. More...
 
 getType ()
 Get the type of the object. More...
 
 getSubtype ()
 Get the subtype of the object. More...
 
 canDelete (int $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 Member Functions

 initializeAttributes ()
 Initialize the attributes array. More...
 

Protected Attributes

const INTEGER_ATTR_NAMES
 
array $attributes = []
 

Detailed Description

Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 18 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 41 of file ElggRiverItem.php.

Member Function Documentation

ElggRiverItem::__get (   $name)

{}

Definition at line 82 of file ElggRiverItem.php.

ElggRiverItem::__isset (   $name)

{}

Definition at line 102 of file ElggRiverItem.php.

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

{}

Exceptions

Definition at line 67 of file ElggRiverItem.php.

ElggRiverItem::__unset (   $name)

{}

Definition at line 109 of file ElggRiverItem.php.

ElggRiverItem::canDelete ( int  $user_guid = 0)

Can a user delete this river item?

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

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 234 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 244 of file ElggRiverItem.php.

ElggRiverItem::getAnnotation ( )

Get the Annotation for this river item.

Returns
|null

Definition at line 166 of file ElggRiverItem.php.

ElggRiverItem::getObjectEntity ( )

Get the object of this river item.

Returns
|null
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 148 of file ElggRiverItem.php.

ElggRiverItem::getSubjectEntity ( )

Get the subject of this river item.

Returns
|null
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 139 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 220 of file ElggRiverItem.php.

ElggRiverItem::getTargetEntity ( )

Get the target of this river item.

Returns
|null

Definition at line 157 of file ElggRiverItem.php.

ElggRiverItem::getTimePosted ( )

Get the time this activity was posted.

Returns
int

Definition at line 184 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 209 of file ElggRiverItem.php.

ElggRiverItem::getView ( )

Get the view used to display this river item.

Returns
string
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 175 of file ElggRiverItem.php.

ElggRiverItem::initializeAttributes ( )
protected

Initialize the attributes array.

Returns
void

Definition at line 122 of file ElggRiverItem.php.

ElggRiverItem::save ( )

Save the river item to the database.

Returns
bool

Definition at line 278 of file ElggRiverItem.php.

ElggRiverItem::toObject ( )

Get a plain old object copy for public consumption.

Returns

Definition at line 257 of file ElggRiverItem.php.

ElggRiverItem::updateLastAction ( int  $last_action = null)

Update the last_action column in the river table.

Parameters
int$last_actionTimestamp of last action
Returns
int

Definition at line 195 of file ElggRiverItem.php.

Member Data Documentation

array ElggRiverItem::$attributes = []
protected

Definition at line 34 of file ElggRiverItem.php.

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

Definition at line 23 of file ElggRiverItem.php.


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