Dropdown::showInteger PHP Method

showInteger() static public method

Dropdown integers
static public showInteger ( $myname, $value, $min, $max = 100, $step = 1, $toadd = [], $options = [] )
$myname select name
$value default value
$min min value (default 0)
$max max value (default 100)
$step step used (default 1)
$toadd array of values to add at the beginning
$options array of additionnal options : - unit : string unit to used - display : boolean if false get string \deprecated since 0.84 use Dropdown::showNumber instead
    static function showInteger($myname, $value, $min = 0, $max = 100, $step = 1, $toadd = array(), $options = array())
    {
        $opt = array('value' => $value, 'min' => $min, 'max' => $max, 'step' => $step, 'toadd' => $toadd);
        if (count($options)) {
            foreach ($options as $key => $val) {
                $opt[$key] = $val;
            }
        }
        return self::showNumber($myname, $opt);
    }

Usage Example

 function displayCriteria()
 {
     $this->getReport()->startColumn();
     echo $this->getCriteriaLabel() . ' :';
     $this->getReport()->endColumn();
     $this->getReport()->startColumn();
     if (empty($this->signe)) {
         Dropdown::showFromArray($this->getName() . "_sign", array('<=' => '<=', '>=' => '>='), array('value' => Toolbox::unclean_cross_side_scripting_deep($this->getParameter($this->getName() . "_sign"))));
         echo "&nbsp;";
     }
     Dropdown::showInteger($this->getName(), $this->getParameterValue(), $this->min, $this->max, 1);
     echo '&nbsp; ' . $this->unit;
     $this->getReport()->endColumn();
 }
All Usage Examples Of Dropdown::showInteger