Elgg  Version master
Variables
friendlytime.php File Reference

Go to the source code of this file.

Variables

 $time = elgg_extract('time', $vars)
 
 $time_updated = elgg_extract('time_updated', $vars)
 
 $date_updated = null
 
 try
 
if(!empty($time_updated)) catch(DataFormatException $e) $default_friendly_time_number_of_days = elgg_get_config('friendly_time_number_of_days')
 
 $friendly_time_number_of_days = (int) elgg_extract('number_of_days', $vars, $default_friendly_time_number_of_days)
 
if(strtotime("-{$friendly_time_number_of_days}days")< $date->getTimestamp()) else
 
 $title = $date->formatLocale(elgg_echo('friendlytime:date_format'))
 
if($date_updated &&($date_updated->getTimestamp() > $date->getTimestamp()+60)) $attributes
 

Variable Documentation

if ($date_updated &&($date_updated->getTimestamp() > $date->getTimestamp()+60)) $attributes
Initial value:
= [
'title' => elgg_extract('title', $vars, $title)
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
$title
$vars
Definition: theme.php:5

Definition at line 44 of file friendlytime.php.

$date_updated = null

Definition at line 17 of file friendlytime.php.

if (!empty($time_updated)) catch (DataFormatException $e) $default_friendly_time_number_of_days = elgg_get_config('friendly_time_number_of_days')

Definition at line 28 of file friendlytime.php.

$friendly_time_number_of_days = (int) elgg_extract('number_of_days', $vars, $default_friendly_time_number_of_days)

Definition at line 29 of file friendlytime.php.

$time = elgg_extract('time', $vars)

Definition at line 15 of file friendlytime.php.

$time_updated = elgg_extract('time_updated', $vars)

Definition at line 16 of file friendlytime.php.

$title = $date->formatLocale(elgg_echo('friendlytime:date_format'))

Definition at line 37 of file friendlytime.php.

if (strtotime("-{$friendly_time_number_of_days}days")< $date->getTimestamp()) else
Initial value:
{
$output = $date->formatLocale(elgg_echo('friendlytime:date_format:short'))
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$output
Definition: download.php:9

Definition at line 33 of file friendlytime.php.

try
Initial value:
{
$date = Values::normalizeTime($time)
$time

Definition at line 19 of file friendlytime.php.