43 throw new \InvalidParameterException(
"Invalid input to \ElggRiverItem constructor");
47 $int_types = array(
'id',
'subject_guid',
'object_guid',
'target_guid',
'annotation_id',
'access_id',
'posted');
49 if (in_array(
$key, $int_types)) {
167 public function delete() {
173 if (!$events->triggerBefore(
'delete',
'river', $this)) {
178 $prefix = $db->prefix;
179 _elgg_services()->db->deleteData(
"DELETE FROM {$prefix}river WHERE id = ?", [$this->
id]);
181 $events->triggerAfter(
'delete',
'river', $this);
201 $params = array(
'item' => $this);
$object
These two snippets demonstrates triggering an event and how to register for that event.
getType()
Get the type of the object.
__construct($object)
Construct a river item object given a database row.
toObject()
Get a plain old object copy for public consumption.
getSubjectEntity()
Get the subject of this river item.
getTimePosted()
Get the time this activity was posted.
getSubtype()
Get the subtype of the object.
elgg_get_annotation_from_id($id)
Get a specific annotation by its id.
getAnnotation()
Get the Annotation for this river item.
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
canDelete($user_guid=0)
Can a user delete this river item?
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
getView()
Get the view used to display this river item.
$user_guid
Avatar remove action.
getTargetEntity()
Get the target of this river item.
getPostedTime()
Get the time this activity was posted.
get_entity($guid)
Loads and returns an entity object from a guid.
getObjectEntity()
Get the object of this river item.