Elgg  Version 6.1
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);
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
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
$subtitle
Definition: member.php:28
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
get_entity(int $guid)
Loads and returns an entity object from a guid.
Definition: entities.php:70
if(!$relationship instanceof ElggRelationship) $entity_one
Definition: member.php:15
elgg_view_icon(string $name, array $vars=[])
View an icon glyph.
Definition: views.php:1261
$location
Definition: member.php:29
$vars
Definition: theme.php:5
if(!$entity_one instanceof ElggUser||!$entity_two instanceof ElggGroup) $user_params
Definition: member.php:21
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145
elgg_view_exists(string $view, string $viewtype= '', bool $recurse=true)
Returns whether the specified view exists.
Definition: views.php:131
elgg_view_entity_url(\ElggEntity $entity, array $options=[])
Helper function for outputting a link to an entity.
Definition: views.php:1444