Elgg  Version 3.0
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(),
19  ]);
20 }
21 
23  'class' => [
24  'elgg-listing-summary-title',
25  ]
26 ], $title);
if($title===false) $entity
Definition: title.php:14
$title
Outputs object title.
Definition: title.php:9
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:168
elgg echo
Translates a string.
Definition: languages.js:43
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:1131
$vars['type']
Definition: save.php:11
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
Definition: output.php:74
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246