Elgg  Version 6.1
profileiconupdate.php
Go to the documentation of this file.
1 <?php
6 $item = elgg_extract('item', $vars);
7 if (!$item instanceof ElggRiverItem) {
8  return;
9 }
10 
11 $subject = $item->getSubjectEntity();
12 if (!$subject instanceof ElggUser) {
13  return;
14 }
15 
16 $subject_link = elgg_view_entity_url($subject, ['class' => 'elgg-river-subject']);
17 
18 $vars['summary'] = elgg_echo('river:update:user:avatar', [$subject_link]);
19 $vars['attachments'] = elgg_view_entity_icon($subject, 'tiny', [
20  'use_hover' => false,
21  'use_link' => false,
22 ]);
23 $vars['responses'] = false;
24 
25 echo elgg_view('river/elements/layout', $vars);
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
if(!$subject instanceof ElggUser) $subject_link
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:256
$item
Update avatar river view.
$vars['summary']
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
elgg_view_entity_icon(\ElggEntity $entity, string $size= 'medium', array $vars=[])
View the icon of an entity.
Definition: views.php:542
if(!$item instanceof ElggRiverItem) $subject
elgg_view_entity_url(\ElggEntity $entity, array $options=[])
Helper function for outputting a link to an entity.
Definition: views.php:1444