42 if (!(
$object instanceof \stdClass)) {
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);
elgg_get_annotation_from_id($id)
Get a specific annotation by its id.
$user_guid
Avatar remove action.
getType()
Get the type of the object.
getTimePosted()
Get the time this activity was posted.
getSubjectEntity()
Get the subject of this river item.
getPostedTime()
Get the time this activity was posted.
getSubtype()
Get the subtype of the object.
getTargetEntity()
Get the target of this river item.
canDelete($user_guid=0)
Can a user delete this river item?
getView()
Get the view used to display this river item.
toObject()
Get a plain old object copy for public consumption.
getAnnotation()
Get the Annotation for this river item.
getObjectEntity()
Get the object of this river item.
__construct($object)
Construct a river item object given a database row.
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
get_entity($guid)
Loads and returns an entity object from a guid.
$object
These two snippets demonstrates triggering an event and how to register for that event.