Go to the source code of this file.
|
| | $vars ['class'] = elgg_extract_class($vars, 'elgg-input-time') |
| |
| | $defaults |
| |
| | $timestamp = elgg_extract('timestamp', $vars) |
| |
| | $format = elgg_extract('format', $vars, $defaults['format'], false) |
| |
| | $min = (int) elgg_extract('min', $vars, 0) |
| |
| | $max = (int) elgg_extract('max', $vars, 24 * 60 * 60) |
| |
| | $step = (int) elgg_extract('step', $vars, 15 * 60) |
| |
| | $value = elgg_extract('value', $vars) |
| |
| | $value_time = '' |
| |
| | $value_timestamp = '' |
| |
| if($value) if($timestamp) | else |
| |
| | $hour_options = [] |
| |
| | $hour_options_ts = range($min, $max, $step) |
| |
| | $dt = new DateTime('now', new DateTimeZone('UTC')) |
| |
| foreach($hour_options_ts as $ts) | $vars ['options_values'] = $hour_options |
| |
◆ $defaults
Initial value:= [
'timestamp' => false,
]
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
Definition at line 21 of file time.php.
◆ $dt
| $dt = new DateTime('now', new DateTimeZone('UTC')) |
◆ $format
| $format = elgg_extract('format', $vars, $defaults['format'], false) |
◆ $hour_options
◆ $hour_options_ts
| $hour_options_ts = range($min, $max, $step) |
◆ $max
◆ $min
◆ $step
◆ $timestamp
◆ $value
◆ $value_time
◆ $value_timestamp
◆ $vars [1/2]
◆ $vars [2/2]
| foreach ( $hour_options_ts as $ts) $vars[ 'options_values'] = $hour_options |
◆ else
Initial value:
Definition at line 63 of file time.php.