1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| public function setup()
{
$this->setWidgets(array(
'date_creation' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'periode_dda' => new sfWidgetFormFilterInput(),
'co_type_livraison' => new sfWidgetFormFilterInput(),
'id_grille_tarif' => new sfWidgetFormFilterInput(),
'id_groupe_declarant' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('GroupeDeclarationDda'), 'add_empty' => true)),
'code_declarant' => new sfWidgetFormFilterInput(),
'nom_support' => new sfWidgetFormFilterInput(),
'code_declaration_publication' => new sfWidgetFormFilterInput(),
'code_declaration_site' => new sfWidgetFormFilterInput(),
'code_tranche' => new sfWidgetFormFilterInput(),
'nb_coupures_publication' => new sfWidgetFormFilterInput(),
'nb_coupures_site' => new sfWidgetFormFilterInput(),
'id_tranche' => new sfWidgetFormFilterInput(),
'tarif_unitaire_editeur' => new sfWidgetFormFilterInput(),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
));
$this->setValidators(array(
'date_creation' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'periode_dda' => new sfValidatorPass(array('required' => false)),
'co_type_livraison' => new sfValidatorPass(array('required' => false)),
'id_grille_tarif' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'id_groupe_declarant' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('GroupeDeclarationDda'), 'column' => 'id_groupe_declaration')),
'code_declarant' => new sfValidatorPass(array('required' => false)),
'nom_support' => new sfValidatorPass(array('required' => false)),
'code_declaration_publication' => new sfValidatorPass(array('required' => false)),
'code_declaration_site' => new sfValidatorPass(array('required' => false)),
'code_tranche' => new sfValidatorPass(array('required' => false)),
'nb_coupures_publication' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'nb_coupures_site' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'id_tranche' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'tarif_unitaire_editeur' => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
)); |
Partager