Elgg  Version 4.3
Variables
subscribe.php File Reference

Go to the source code of this file.

Variables

 $entity_guid = (int) get_input('guid')
 Handle subscribing to an entity. More...
 
 $user_guid = (int) get_input('user_guid', elgg_get_logged_in_user_guid())
 
 $methods = (array) get_input('methods', [])
 
 $type = get_input('type')
 
 $subtype = get_input('subtype')
 
 $action = get_input('action')
 
 $forward_url = get_input('forward_url')
 
 $show_success = (bool) get_input('show_success', true)
 
 $entity = get_entity($entity_guid)
 
if(!$entity instanceof\ElggEntity$user = get_user($user_guid)
 
if(!$user instanceof\ElggUser||!$user->canEdit()) $display_name = $entity->getDisplayName() ?: elgg_echo('item')
 
if(!$entity->addSubscription($user->guid, $methods, $type, $subtype, $action)) $success_keys
 
 $message = ''
 

Variable Documentation

$action = get_input('action')
if (!$user instanceof\ElggUser||!$user->canEdit()) $display_name = $entity->getDisplayName() ?: elgg_echo('item')

Definition at line 26 of file subscribe.php.

$entity = get_entity($entity_guid)

Definition at line 16 of file subscribe.php.

$entity_guid = (int) get_input('guid')

Handle subscribing to an entity.

Definition at line 6 of file subscribe.php.

$forward_url = get_input('forward_url')

Definition at line 13 of file subscribe.php.

$message = ''

Definition at line 38 of file subscribe.php.

$methods = (array) get_input('methods', [])

Definition at line 8 of file subscribe.php.

$show_success = (bool) get_input('show_success', true)

Definition at line 14 of file subscribe.php.

$subtype = get_input('subtype')

Definition at line 10 of file subscribe.php.

if (!$entity->addSubscription($user->guid, $methods, $type, $subtype, $action)) $success_keys
Initial value:
= [
"entity:subscribe:{$entity->type}:{$entity->subtype}:success",
"entity:subscribe:{$entity->type}:success",
'entity:subscribe:success',
]

Definition at line 32 of file subscribe.php.

$type = get_input('type')

Definition at line 9 of file subscribe.php.

if (!$entity instanceof\ElggEntity) $user = get_user($user_guid)

Definition at line 21 of file subscribe.php.

$user_guid = (int) get_input('user_guid', elgg_get_logged_in_user_guid())

Definition at line 7 of file subscribe.php.