Elgg  Version master
owner.php
Go to the documentation of this file.
1 <?php
12 if (!$item instanceof ElggEntity) {
13  return;
14 }
15 
16 $link = elgg_extract('link', $vars, true);
17 
18 $entity = $item->getOwnerEntity();
19 if (!$entity) {
20  return;
21 }
22 
23 echo $link ? elgg_view_entity_url($entity) : $entity->getDisplayName();
if(!$item instanceof ElggEntity) $link
Definition: owner.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:254
if(!$entity instanceof\ElggUser) $vars['options']
Definition: owner.php:20
$item
Render an owner element.
Definition: owner.php:11
$entity
Definition: owner.php:18
elgg_view_entity_url(\ElggEntity $entity, array $options=[])
Helper function for outputting a link to an entity.
Definition: views.php:1444