Elgg  Version master
Variables
mute.php File Reference

Go to the source code of this file.

Variables

 $entity = elgg_extract('entity', $vars)
 Form to mute notifications about an entity. More...
 
 $recipient = elgg_extract('recipient', $vars)
 
if(! $entity instanceof \ElggEntity||! $recipient instanceof \ElggUser$get_language_key
 
 $checkboxes = ''
 
 $mute_guids = []
 
if($entity instanceof \ElggComment) elseif(!elgg_is_empty($entity->getDisplayName())) $container = ($entity instanceof ElggComment) ? $entity->getContainerEntity()->getContainerEntity() : $entity->getContainerEntity()
 
if(($container instanceof \ElggGroup|| $container instanceof \ElggUser) &&!in_array($container->guid, $mute_guids)) $owner = $entity->getOwnerEntity()
 
if(($owner instanceof \ElggGroup|| $owner instanceof \ElggUser) &&!in_array($owner->guid, $mute_guids)) $actor = elgg_extract('actor', $vars)
 
if(($actor instanceof \ElggGroup|| $actor instanceof \ElggUser) &&!in_array($actor->guid, $mute_guids)) if (empty( $checkboxes))
 
 $hmac
 
 $footer
 

Variable Documentation

◆ $actor

if (( $owner instanceof \ElggGroup||$owner instanceof \ElggUser) &&!in_array( $owner->guid, $mute_guids)) $actor = elgg_extract('actor', $vars)

Definition at line 78 of file mute.php.

◆ $checkboxes

$checkboxes = ''

Definition at line 30 of file mute.php.

◆ $container

if ( $entity instanceof \ElggComment) elseif (!elgg_is_empty( $entity->getDisplayName())) $container = ($entity instanceof ElggComment) ? $entity->getContainerEntity()->getContainerEntity() : $entity->getContainerEntity()

Definition at line 54 of file mute.php.

◆ $entity

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

Form to mute notifications about an entity.

@uses $vars['entity'] the entity to mute notifications for @uses $vars['recipient'] the recipient of the notification @uses $vars['actor'] the actor of the notification

Definition at line 10 of file mute.php.

◆ $footer

$footer
Initial value:
'#type' => 'submit',
'text' => elgg_echo('save'),
])
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112

Definition at line 124 of file mute.php.

◆ $get_language_key

if (! $entity instanceof \ElggEntity||! $recipient instanceof \ElggUser) $get_language_key
Initial value:
= function(\ElggEntity $entity, string $default_postfix) {
$keys = [
"notifications:mute:{$entity->type}:{$entity->subtype}",
"notifications:mute:{$entity->type}",
"notifications:mute:{$default_postfix}",
];
foreach ($keys as $key) {
return $key;
}
}
}
$entity
Definition: mute.php:12
elgg_language_key_exists(string $key, string $language='en')
Check if a given language key exists.
Definition: languages.php:44
if($container instanceof ElggGroup && $container->guid !=elgg_get_page_owner_guid()) $key
Definition: summary.php:44
$keys
Definition: access.php:31

Definition at line 16 of file mute.php.

◆ $hmac

$hmac
Initial value:
'entity_guid' => $entity->guid,
'recipient_guid' => $recipient->guid,
])
$recipient
Definition: mute.php:8
elgg_build_hmac($data)
Get an HMAC token builder/validator object.
Definition: actions.php:57

Definition at line 108 of file mute.php.

◆ $mute_guids

$mute_guids = []

Definition at line 31 of file mute.php.

◆ $owner

if (( $container instanceof \ElggGroup||$container instanceof \ElggUser) &&!in_array( $container->guid, $mute_guids)) $owner = $entity->getOwnerEntity()

Definition at line 66 of file mute.php.

◆ $recipient

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

Definition at line 11 of file mute.php.

◆ if

if (( $actor instanceof \ElggGroup||$actor instanceof \ElggUser) &&!in_array( $actor->guid, $mute_guids)) if(empty($checkboxes)) ( empty( $checkboxes)  )

Definition at line 90 of file mute.php.