| Conditions | 1 |
| Paths | 1 |
| Total Lines | 49 |
| Code Lines | 34 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 27 | public function init() |
||
| 28 | { |
||
| 29 | $this->setName('params'); |
||
| 30 | $this->add([ |
||
| 31 | 'name' => 'search', |
||
| 32 | 'options' => [ |
||
| 33 | 'label' => /*@translate*/ |
||
| 34 | 'Desired work' |
||
| 35 | ] |
||
| 36 | ]); |
||
| 37 | |||
| 38 | $this->add( |
||
| 39 | array( |
||
| 40 | 'name' => 'l', |
||
| 41 | 'type' => 'Location', |
||
| 42 | 'options' => array( |
||
| 43 | 'label' => /*@translate*/ |
||
| 44 | 'Location', |
||
| 45 | 'engine_type' => $this->locationEngineType, |
||
| 46 | ), |
||
| 47 | ) |
||
| 48 | ); |
||
| 49 | |||
| 50 | $this->add( |
||
| 51 | array( |
||
| 52 | 'name' => 'd', |
||
| 53 | 'type' => 'Zend\Form\Element\Select', |
||
| 54 | 'options' => array( |
||
| 55 | 'label' => /*@translate*/ |
||
| 56 | 'Distance', |
||
| 57 | 'value_options' => [ |
||
| 58 | '5' => '5 km', |
||
| 59 | '10' => '10 km', |
||
| 60 | '20' => '20 km', |
||
| 61 | '50' => '50 km', |
||
| 62 | '100' => '100 km' |
||
| 63 | ], |
||
| 64 | |||
| 65 | ), |
||
| 66 | 'attributes' => [ |
||
| 67 | 'value' => '10', // default distance |
||
| 68 | 'data-searchbox' => -1, // hide the search box |
||
| 69 | 'data-allowclear' => 'false', // allow to clear a selected value |
||
| 70 | 'data-placeholder' => /*@translate*/ |
||
| 71 | 'Distance', |
||
| 72 | ] |
||
| 73 | ) |
||
| 74 | ); |
||
| 75 | } |
||
| 76 | } |