|
Revision 75, 0.8 kB
(checked in by nperriault, 5 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 |
|
|---|
| 7 |
|
|---|
| 8 |
class ApplicationCompanyForm extends BaseApplicationCompanyForm |
|---|
| 9 |
{ |
|---|
| 10 |
|
|---|
| 11 |
* Form configuration |
|---|
| 12 |
* |
|---|
| 13 |
*/ |
|---|
| 14 |
public function configure() |
|---|
| 15 |
{ |
|---|
| 16 |
if (!is_array($this->getOption('companies')) || array() === $this->getOption('companies')) |
|---|
| 17 |
{ |
|---|
| 18 |
$this->setOption('companies', array()); |
|---|
| 19 |
} |
|---|
| 20 |
|
|---|
| 21 |
unset($this['id']); |
|---|
| 22 |
|
|---|
| 23 |
$this->widgetSchema['company_id'] = new sfWidgetFormSelect(array('choices' => $this->getOption('companies'))); |
|---|
| 24 |
$this->validatorSchema['company_id'] = new sfValidatorChoice(array('choices' => array_keys($this->getOption('companies')))); |
|---|
| 25 |
|
|---|
| 26 |
$this->mergeForm(new BaseConnectionForm()); |
|---|
| 27 |
|
|---|
| 28 |
$this->widgetSchema->setNameFormat('connection[%s]'); |
|---|
| 29 |
} |
|---|
| 30 |
} |
|---|
| 31 |
|
|---|