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

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

Definition at line 43 of file num_display.php.

◆ $min

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

Definition at line 40 of file num_display.php.

◆ $name

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

Definition at line 21 of file num_display.php.

◆ $value

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

Definition at line 31 of file num_display.php.

◆ $vars [1/7]

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

Definition at line 28 of file num_display.php.

◆ $vars [2/7]

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

Definition at line 54 of file num_display.php.

◆ $vars [3/7]

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

Definition at line 52 of file num_display.php.

◆ $vars [4/7]

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

Definition at line 41 of file num_display.php.

◆ $vars [5/7]

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

Definition at line 22 of file num_display.php.

◆ $vars [6/7]

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

Definition at line 38 of file num_display.php.

◆ $vars [7/7]

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

Definition at line 36 of file num_display.php.

◆ $widget

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

Widget edit num_display.

@uses $vars['entity'] ElggWidget @uses $vars['name'] (optional) The name of the attribute, defaults to 'num_display' @uses $vars['default'] (optional) The default value if no value is set, defaults to 4 @uses $vars['step'] (optional) The stepsize used in the number input, defaults to 1 @uses $vars['min'] (optional) The smallest value allowed, defaults to 1 @uses $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.