Elgg  Version master
Variables
num_display.php File Reference

Go to the source code of this file.

Variables

 $widget = elgg_extract('entity', $vars)
 Widget edit num_display. More...
 
 $name = elgg_extract('name', $vars, 'num_display')
 
 $vars ['name'] = "params[{$name}]"
 
if(!isset($vars['label'])) $vars ['#label'] = elgg_extract('label', $vars)
 
 $value = (int) $widget->$name
 
if($value< 1) $vars ['value'] = $value
 
 $vars ['step'] = (int) elgg_extract('step', $vars, 1)
 
 $min = (int) elgg_extract('min', $vars, 1)
 
 $vars ['min'] = max($min, 1)
 
 $max = (int) elgg_extract('max', $vars, false)
 
if(!$max) if(!$max) $vars ['max'] = max($max, $vars['min'])
 
 $vars ['#type'] = 'number'
 

Variable Documentation

$max = (int) elgg_extract('max', $vars, false)

Definition at line 43 of file num_display.php.

$min = (int) elgg_extract('min', $vars, 1)

Definition at line 40 of file num_display.php.

$name = elgg_extract('name', $vars, 'num_display')

Definition at line 21 of file num_display.php.

$value = (int) $widget->$name

Definition at line 31 of file num_display.php.

$vars['name'] = "params[{$name}]"

Definition at line 22 of file num_display.php.

if (!isset($vars['label'])) $vars['#label'] = elgg_extract('label', $vars)

Definition at line 28 of file num_display.php.

if ($value< 1) $vars['value'] = $value

Definition at line 36 of file num_display.php.

$vars['step'] = (int) elgg_extract('step', $vars, 1)

Definition at line 38 of file num_display.php.

$vars['min'] = max($min, 1)

Definition at line 41 of file num_display.php.

if (!$max) if (!$max) $vars['max'] = max($max, $vars['min'])

Definition at line 52 of file num_display.php.

$vars['#type'] = 'number'

Definition at line 54 of file num_display.php.

$widget = elgg_extract('entity', $vars)

Widget edit num_display.

$vars['entity'] ElggWidget $vars['name'] (optional) The name of the attribute, defaults to 'num_display' $vars['default'] (optional) The default value if no value is set, defaults to 4 $vars['step'] (optional) The stepsize used in the number input, defaults to 1 $vars['min'] (optional) The smallest value allowed, defaults to 1 $vars['max'] (optional) The largest value allowed, defaults first to 'default_limit' and as last straw to max(min, 20)

Definition at line 14 of file num_display.php.