Redaxscript\Html\Form::selectRange PHP Method

selectRange() public method

append the select range
Since: 3.0.0
public selectRange ( array $rangeArray = [], array $attributeArray = [] ) : Form
$rangeArray array range of the select
$attributeArray array attributes of the select
return Form
    public function selectRange($rangeArray = [], $attributeArray = [])
    {
        $this->select(range($rangeArray['min'], $rangeArray['max']), $attributeArray);
        return $this;
    }

Usage Example

Example #1
0
 /**
  * testSelectRange
  *
  * @since 3.0.0
  *
  * @param array $rangeArray
  * @param array $attributeArray
  * @param string $expect
  *
  * @dataProvider providerSelectRange
  */
 public function testSelectRange($rangeArray = [], $attributeArray = [], $expect = null)
 {
     /* setup */
     $form = new Html\Form($this->_registry, $this->_language);
     $form->init();
     $form->selectRange($rangeArray, $attributeArray);
     /* actual */
     $actual = $form;
     /* compare */
     $this->assertEquals($expect, $actual);
 }