Elgg  Version 4.3
member.php
Go to the documentation of this file.
1 <?php
10 $relationship = elgg_extract('relationship', $vars);
11 if (!$relationship instanceof ElggRelationship) {
12  return;
13 }
14 
17 if (!$entity_one instanceof ElggUser || !$entity_two instanceof ElggGroup) {
18  return;
19 }
20 
22  'entity' => $entity_one,
23  'full_view' => false,
24 ];
25 
27 
28 $subtitle = '';
29 $location = $entity_one->getProfileData('location');
30 if (is_string($location) && $location !== '') {
31  $location = elgg_view_icon('map-marker') . ' ' . $location;
33 }
34 
35 $briefdescription = $entity_one->getProfileData('briefdescription');
36 if (is_string($briefdescription) && $briefdescription !== '') {
38 }
39 
40 $user_params['subtitle'] = $subtitle ?: false;
41 
42 if (elgg_view_exists('user/status')) {
43  $user_params['content'] = elgg_view('user/status', ['entity' => $entity_one]);
44 }
45 
47 echo elgg_view('relationship/elements/summary', $user_params);
elgg_view_exists($view, $viewtype= '', $recurse=true)
Returns whether the specified view exists.
Definition: views.php:152
if(is_string($location)&&$location!== '') $briefdescription
Definition: member.php:35
$relationship
Elgg (group) member relationship view.
Definition: member.php:10
$entity_two
Definition: member.php:16
$subtitle
Definition: member.php:28
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:135
if(!$relationship instanceof ElggRelationship) $entity_one
Definition: member.php:15
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
$location
Definition: member.php:29
elgg_view_icon($name, $vars=[])
View an icon glyph.
Definition: views.php:1297
if(!$entity_one instanceof ElggUser||!$entity_two instanceof ElggGroup) $user_params
Definition: member.php:21
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24
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
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:69