Elgg  Version master
create.php
Go to the documentation of this file.
1 <?php
9 $item = elgg_extract('item', $vars);
10 if (!$item instanceof ElggRiverItem) {
11  return;
12 }
13 
14 $object = $item->getObjectEntity();
15 if (!$object instanceof ElggObject) {
16  return;
17 }
18 
19 $vars['message'] = elgg_get_excerpt((string) $object->description);
20 
21 echo elgg_view('river/elements/layout', $vars);
$item
Post comment river view.
Definition: create.php:6
if(elgg_substr($message,-3)=== '...') $vars['message']
Definition: create.php:50
if(!$item instanceof ElggRiverItem) $object
Definition: create.php:14
elgg_get_excerpt(string $text, int $num_chars=250)
Returns an excerpt.
Definition: output.php:83
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:156