Elgg  Version 4.3
title.php
Go to the documentation of this file.
1 <?php
9 $title = elgg_extract('title', $vars, '');
10 if ($title === false) {
11  return;
12 }
13 
14 $entity = elgg_extract('entity', $vars);
15 if ($title === '' && $entity instanceof ElggEntity) {
16  $title = elgg_view('output/url', [
17  'text' => elgg_get_excerpt($entity->getDisplayName(), 100),
18  'href' => $entity->getURL() ?: false,
19  ]);
20 }
21 
23  'class' => [
24  'elgg-listing-summary-title',
25  ]
26 ], elgg_format_element('h3', [], $title));
if($title===false) $entity
Definition: title.php:14
$title
Output annotation title.
Definition: title.php:9
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:135
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
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
Definition: output.php:72
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