Elgg
Version 6.1
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
page
components
column
excerpt.php
Go to the documentation of this file.
1
<?php
11
$item
=
elgg_extract
(
'item'
,
$vars
);
12
if
(!
$item
instanceof \
ElggEntity
) {
13
return
;
14
}
15
16
$length
=
elgg_extract
(
'length'
,
$vars
, 250);
17
18
$description
=
$item
->description ??
''
;
19
20
echo
elgg_get_excerpt
(
$description
,
$length
);
$length
if(!$item instanceof\ElggEntity) $length
Definition:
excerpt.php:16
elgg_get_excerpt
elgg_get_excerpt(string $text, int $num_chars=250)
Returns an excerpt.
Definition:
output.php:83
elgg_extract
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:256
$description
$description
Definition:
excerpt.php:18
$vars
$vars
Definition:
theme.php:5
ElggEntity
Definition:
ElggEntity.php:52
$item
$item
Render an excerpt of the description.
Definition:
excerpt.php:11
Generated on Wed Dec 4 2024 00:00:23 for Elgg by
1.8.11