Elgg  Version master
container.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->getContainerEntity();
19 if (!$entity) {
20  return;
21 }
22 
23 echo $link ? elgg_view_entity_url($entity) : $entity->getDisplayName();
$entity
Definition: container.php:18
if(!$item instanceof ElggEntity) $link
Definition: container.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
$vars
Definition: theme.php:5
$item
Render a container element.
Definition: container.php:11
elgg_view_entity_url(\ElggEntity $entity, array $options=[])
Helper function for outputting a link to an entity.
Definition: views.php:1444