|
Revision 75, 1.0 kB
(checked in by nperriault, 3 months ago)
|
[1.1]:
- Companies and people modules migrated, with according form classes and templates, and functional test suite
- Enhanced SymfoniansTestBrowser?
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
class JobFilterForm extends CountrySelectorForm |
|---|
| 7 |
{ |
|---|
| 8 |
|
|---|
| 9 |
* Companies |
|---|
| 10 |
* @var array |
|---|
| 11 |
*/ |
|---|
| 12 |
protected $companies = array(); |
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
* Public constructor |
|---|
| 16 |
* |
|---|
| 17 |
* @param array $countries Jobs countries |
|---|
| 18 |
* @param array|null $companies Jobs companies |
|---|
| 19 |
* @see CountrySelectorForm |
|---|
| 20 |
*/ |
|---|
| 21 |
public function __construct($countries = array(), $companies = array(), $defaults = array(), $options = array(), $CSRFSecret = null) |
|---|
| 22 |
{ |
|---|
| 23 |
$this->companies = array_merge(array('' => __('Any company')), $companies); |
|---|
| 24 |
|
|---|
| 25 |
parent::__construct($countries, $defaults, $options, $CSRFSecret); |
|---|
| 26 |
} |
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
* Form configuration |
|---|
| 30 |
* |
|---|
| 31 |
*/ |
|---|
| 32 |
public function configure() |
|---|
| 33 |
{ |
|---|
| 34 |
$this->widgetSchema['company'] = new sfWidgetFormSelect(array('choices' => $this->companies)); |
|---|
| 35 |
$this->validatorSchema['company'] = new sfValidatorChoice(array('choices' => array_keys($this->companies))); |
|---|
| 36 |
} |
|---|
| 37 |
} |
|---|