41 throw new \InvalidParameterException(
"Invalid input to \ElggRiverItem constructor");
45 $int_types = [
'id',
'subject_guid',
'object_guid',
'target_guid',
'annotation_id',
'access_id',
'posted'];
47 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);
getType()
Get the type of the object.
if(!$item instanceof ElggRiverItem) $object
if(!$user||!$user->canDelete()) $name
$params
Saves global plugin settings.
__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.
$user_guid
Validate a user.
elgg_get_annotation_from_id($id)
Elgg annotations Functions to manage object annotations.
getAnnotation()
Get the Annotation for this river item.
canDelete($user_guid=0)
Can a user delete this river item?
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
getView()
Get the view used to display this river item.
_elgg_services()
Get the global service provider.
getTargetEntity()
Get the target of this river item.
get_entity($guid)
Loads and returns an entity object from a guid.
getObjectEntity()
Get the object of this river item.