Elgg  Version 3.0
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('output/url', [
17  'href' => $subject->getURL(),
18  'text' => $subject->getDisplayName(),
19  'class' => 'elgg-river-subject',
20  'is_trusted' => true,
21 ]);
22 
23 $vars['summary'] = elgg_echo('river:update:user:avatar', [$subject_link]);
24 $vars['attachments'] = elgg_view_entity_icon($subject, 'tiny', [
25  'use_hover' => false,
26  'use_link' => false,
27 ]);
28 $vars['responses'] = false;
29 
30 echo elgg_view('river/elements/layout', $vars);
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_entity_icon(\ElggEntity $entity, $size= 'medium', $vars=[])
View the icon of an entity.
Definition: views.php:899
if(!$subject instanceof ElggUser) $subject_link
$item
Update avatar river view.
$vars['summary']
elgg echo
Translates a string.
Definition: languages.js:43
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:1131
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246