/** * Constructor. * * @param string $name * @param null|string $title * @param string $value * @param null|array $options */ public function __construct($name, $title = null, $value = '', array $options = null) { if ($options) { $this->setUIOptions($options); } parent::__construct($name, $title, $value); }
/** * Create a new field. * @param string $name The internal field name, passed to forms. * @param string $title The field label. * @param string $value The value of the field. * @param integer $min The minimum allowed value * @param integer $max The maximum allowed value * @param integer $step The increments to increase bye * @param string $prefix Prefixed to the value for display purposes * @param string $suffix Appended to the value for display purposes * @param string $width CSS width for sizing the slider itself (default is "50%") * @param Form $form Reference to the container form * @param string $rightTitle */ function __construct($name, $title = null, $value = null, $min = 0, $max = 100, $step = 1, $prefix = null, $suffix = null, $width = "50%", $form = null, $rightTitle = null) { $this->name = $name; $this->title = ($title === null) ? $name : $title; $this->setMinimum($min); $this->setMaximum($max); $this->setStep($step); $this->setPrefix($prefix); $this->setSuffix($suffix); $this->setWidth($width); if($value !== NULL) $this->setValue($value); if($form) $this->setForm($form); parent::__construct($name, $title, $value, $form, $rightTitle); }
/** * Create a SliderField object * * @param string $name * @param string $title * @param integer $minimum * @param integer $maximum * @param integer $value * @param integer $maxLength * @param Form $form */ public function __construct($name, $title = null, $minimum = null, $maximum = null, $value = '', $maxLength = null, $form = null) { parent::__construct($name, $title, $value, $maxLength, $form); $this->setMaximum($maximum); $this->setMinimum($minimum); }