Elgg  Version master
Variables
record.php File Reference

Go to the source code of this file.

Variables

 $user = elgg_extract('user', $vars)
 Displays a subscription record with preference choices. More...
 
 $entity = elgg_extract('entity', $vars)
 
if(! $entity instanceof ElggEntity||! $user instanceof ElggUser||! $user->canEdit()) $methods = elgg_get_notification_methods()
 
 $icon = elgg_view_entity_icon($entity, 'tiny')
 
 $preferred_methods = []
 
 $has_detailed_subscriptions = false
 
 $relationships_concat = $entity->getVolatileData('select:relationships')
 
if(isset($relationships_concat)) else
 
foreach($methods as $method) $container = elgg_format_element('div', ['class' => 'elgg-subscription-description'], elgg_view_image_block($icon, elgg_view_entity_url($entity)))
 
 $icon_class = ['elgg-subscription-details-toggle']
 

Variable Documentation

◆ $container

$container = elgg_format_element('div', ['class' => 'elgg-subscription-description'], elgg_view_image_block($icon, elgg_view_entity_url($entity)))

Definition at line 62 of file record.php.

◆ $entity

$entity = elgg_extract('entity', $vars)

Definition at line 12 of file record.php.

◆ $has_detailed_subscriptions

$has_detailed_subscriptions = false

Definition at line 29 of file record.php.

◆ $icon

$icon = elgg_view_entity_icon($entity, 'tiny')

Definition at line 26 of file record.php.

◆ $icon_class

$icon_class = ['elgg-subscription-details-toggle']

Definition at line 73 of file record.php.

◆ $methods

if (! $entity instanceof ElggEntity||! $user instanceof ElggUser||! $user->canEdit()) $methods = elgg_get_notification_methods()

Definition at line 18 of file record.php.

◆ $preferred_methods

$preferred_methods = []

Definition at line 28 of file record.php.

◆ $relationships_concat

$relationships_concat = $entity->getVolatileData('select:relationships')

Definition at line 32 of file record.php.

◆ $user

$user = elgg_extract('user', $vars)

Displays a subscription record with preference choices.

@tip for correct styling this view should be wrapped in an element with the class 'elgg-subscription-record' which is wrapped in an element with the class 'elgg-subscriptions'

@uses $vars['user'] Subscriber @uses $vars['entity'] Target entity of the subscription

Definition at line 11 of file record.php.

◆ else

if (isset( $relationships_concat)) else
Initial value:
{
foreach ($methods as $method) {
if ($entity->hasSubscription($user->guid, $method)) {
$preferred_methods[$method] = $method;
}
}
}
if(empty($methods)) $method_options
Definition: record.php:26
$user
Generic view to set a notification preference for a specific purpose.
Definition: record.php:14
if(! $user instanceof \ElggUser||empty($description)||empty($purpose)) $methods
Definition: record.php:21
$preferred_methods
Definition: record.php:28
$entity
Definition: record.php:12

Definition at line 48 of file record.php.