Elgg  Version 4.3
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($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
elgg_view_entity_icon(\ElggEntity $entity, $size= 'medium', $vars=[])
View the icon of an entity.
Definition: views.php:567
if(!$subject instanceof ElggUser) $subject_link
$item
Update avatar river view.
$vars['summary']
if(!$item instanceof ElggRiverItem) $subject
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:547
elgg echo
Translates a string.
Definition: deprecated.js:530
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:179
elgg_view_entity_url(\ElggEntity $entity, array $options=[])
Helper function for outputting a link to an entity.
Definition: views.php:1530