FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Number.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class Number extends \Rsi\Fred\Controller\View\Html\Widget{
6 
7  protected function attribs(){
8  $attribs = parent::attribs();
9  $widget = $this->_widget;
10  if(!$widget->nothing($widget->min) && !$widget->nothing($widget->max)) $attribs['maxlength'] = $attribs['size'] = max(
11  strlen($widget->format($widget->min,false)),
12  strlen($widget->format($widget->max,false))
13  );
14  return $attribs;
15  }
16 
17  public function render($value = null,$raw = false){
18  if(!$this->_widget->decimals) $this->_inputType = 'tel';
19  return parent::render($value,$raw);
20  }
21 
22 }
render($value=null, $raw=false)
Definition: Number.php:17