50 if (!array_key_exists(
$key, $this->attributes)) {
54 if (in_array(
$key, static::INTEGER_ATTR_NAMES)) {
68 if (!array_key_exists(
$name, $this->attributes)) {
69 throw new ElggRuntimeException(
"It's not allowed to set {$name} on " . get_class($this));
72 if (in_array(
$name, static::INTEGER_ATTR_NAMES)) {
92 if (array_key_exists(
$name, $this->attributes)) {
93 return $this->attributes[
$name];
110 if (!array_key_exists(
$name, $this->attributes)) {
114 $this->attributes[
$name] =
null;
123 $this->attributes[
'id'] = null;
124 $this->attributes[
'action_type'] =
null;
125 $this->attributes[
'view'] =
null;
126 $this->attributes[
'subject_guid'] =
null;
127 $this->attributes[
'object_guid'] =
null;
128 $this->attributes[
'target_guid'] =
null;
129 $this->attributes[
'annotation_id'] =
null;
130 $this->attributes[
'posted'] =
null;
131 $this->attributes[
'last_action'] =
null;
176 return (string) $this->view;
185 return (int) $this->posted;
196 $this->last_action =
_elgg_services()->riverTable->updateLastAction($this, $last_action);
198 return $this->last_action;
244 public function delete():
bool {
245 if (!$this->canDelete()) {
260 $object->subject_guid = $this->subject_guid;
262 $object->object_guid = $this->object_guid;
263 $object->annotation_id = $this->annotation_id;
264 $object->action = $this->action_type;
266 $object->time_posted = date(
'c', $this->getTimePosted());
267 $object->last_action = date(
'c', $this->last_action);
if(! $user||! $user->canDelete()) $name
$id
Generic annotation delete action.
if(!empty($avatar) &&! $avatar->isValid()) elseif(empty($avatar)) if(! $owner->saveIconFromUploadedFile('avatar')) if(!elgg_trigger_event('profileiconupdate', $owner->type, $owner)) $view
$params
Saves global plugin settings.
return[ 'admin/delete_admin_notices'=>['access'=> 'admin'], 'admin/menu/save'=>['access'=> 'admin'], 'admin/plugins/activate'=>['access'=> 'admin'], 'admin/plugins/activate_all'=>['access'=> 'admin'], 'admin/plugins/deactivate'=>['access'=> 'admin'], 'admin/plugins/deactivate_all'=>['access'=> 'admin'], 'admin/plugins/set_priority'=>['access'=> 'admin'], 'admin/security/security_txt'=>['access'=> 'admin'], 'admin/security/settings'=>['access'=> 'admin'], 'admin/security/regenerate_site_secret'=>['access'=> 'admin'], 'admin/site/cache/invalidate'=>['access'=> 'admin'], 'admin/site/flush_cache'=>['access'=> 'admin'], 'admin/site/icons'=>['access'=> 'admin'], 'admin/site/set_maintenance_mode'=>['access'=> 'admin'], 'admin/site/set_robots'=>['access'=> 'admin'], 'admin/site/theme'=>['access'=> 'admin'], 'admin/site/unlock_upgrade'=>['access'=> 'admin'], 'admin/site/settings'=>['access'=> 'admin'], 'admin/upgrade'=>['access'=> 'admin'], 'admin/upgrade/reset'=>['access'=> 'admin'], 'admin/user/ban'=>['access'=> 'admin'], 'admin/user/bulk/ban'=>['access'=> 'admin'], 'admin/user/bulk/delete'=>['access'=> 'admin'], 'admin/user/bulk/unban'=>['access'=> 'admin'], 'admin/user/bulk/validate'=>['access'=> 'admin'], 'admin/user/change_email'=>['access'=> 'admin'], 'admin/user/delete'=>['access'=> 'admin'], 'admin/user/login_as'=>['access'=> 'admin'], 'admin/user/logout_as'=>[], 'admin/user/makeadmin'=>['access'=> 'admin'], 'admin/user/resetpassword'=>['access'=> 'admin'], 'admin/user/removeadmin'=>['access'=> 'admin'], 'admin/user/unban'=>['access'=> 'admin'], 'admin/user/validate'=>['access'=> 'admin'], 'annotation/delete'=>[], 'avatar/upload'=>[], 'comment/save'=>[], 'diagnostics/download'=>['access'=> 'admin'], 'entity/chooserestoredestination'=>[], 'entity/delete'=>[], 'entity/mute'=>[], 'entity/restore'=>[], 'entity/subscribe'=>[], 'entity/trash'=>[], 'entity/unmute'=>[], 'entity/unsubscribe'=>[], 'login'=>['access'=> 'logged_out'], 'logout'=>[], 'notifications/mute'=>['access'=> 'public'], 'plugins/settings/remove'=>['access'=> 'admin'], 'plugins/settings/save'=>['access'=> 'admin'], 'plugins/usersettings/save'=>[], 'register'=>['access'=> 'logged_out', 'middleware'=>[\Elgg\Router\Middleware\RegistrationAllowedGatekeeper::class,],], 'river/delete'=>[], 'settings/notifications'=>[], 'settings/notifications/subscriptions'=>[], 'user/changepassword'=>['access'=> 'public'], 'user/requestnewpassword'=>['access'=> 'public'], 'useradd'=>['access'=> 'admin'], 'usersettings/save'=>[], 'widgets/add'=>[], 'widgets/delete'=>[], 'widgets/move'=>[], 'widgets/save'=>[],]
elgg_get_annotation_from_id(int $id)
Elgg annotations Functions to manage object annotations.
getType()
Get the type of the object.
getTimePosted()
Get the time this activity was posted.
initializeAttributes()
Initialize the attributes array.
getSubjectEntity()
Get the subject of this river item.
getSubtype()
Get the subtype of the object.
getTargetEntity()
Get the target of this river item.
canDelete(int $user_guid=0)
Can a user delete this river item?
save()
Save the river item to the database.
__set(string $name, $value)
{}
getView()
Get the view used to display this river item.
toObject()
Get a plain old object copy for public consumption.
__construct(?\stdClass $row=null)
Construct a river item object.
getAnnotation()
Get the Annotation for this river item.
getObjectEntity()
Get the object of this river item.
updateLastAction(?int $last_action=null)
Update the last_action column in the river table.
Exception thrown if an error which can only be found on runtime occurs.
if($email instanceof \Elgg\Email) $object
_elgg_services()
Get the global service provider.
get_entity(int $guid)
Loads and returns an entity object from a guid.
if($container instanceof ElggGroup && $container->guid !=elgg_get_page_owner_guid()) $key
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.