Elgg  Version master
tags.php
Go to the documentation of this file.
1 <?php
9 $tags = elgg_extract('tags', $vars, '');
10 if ($tags === false) {
11  return;
12 }
13 
14 $entity = elgg_extract('entity', $vars);
15 if ($tags === '' && $entity instanceof ElggEntity) {
16  $tags = elgg_view('output/tags', [
17  'entity' => $entity,
18  ]);
19 }
20 
21 echo $tags;
if($tags===false) $entity
Definition: tags.php:14
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
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:177
$vars['class']
Elgg tag input Displays a tag input field.
Definition: tags.php:12
$tags
Output object tags.
Definition: tags.php:9