ok, i found a solution:
in my xxxGeneratorConfiguration.class.php i added getFormFields method
with unset unwanted fields:
public function getFormFields(sfForm $form, $context) {
$fields = parent::getFormFields($form, $context);
if(!$form->getOption('withInfo')):
unset($fields['NONE']['info'],
$fields['NONE']['stock_out_channel_id'], $fields['NONE']['price'],
$fields['NONE']['shippingcosts']);
else:
unset($fields['NONE']['stock_in'],$fields['NONE']['location_id']);
endif;
return $fields;
}
is there a better method to solve this about generator.yml?
Am 12.10.2010 18:06, schrieb Christian:
hi,
i have a backend module generated by propel:generate-admin. I need two
different edit views. One view with all possible form fields and one
view with one form field only.
i created an new executeEdit2() action in generated actions.class.php
and added to my generator.yml:
form: ~
edit2:
display:
NONE: [foobar]
edit: ~
new: ~
i get a parse error: Your generator configuration contains some errors
for the "edit2" context.
i also tried to add methods to xxxGeneratorConfiguration with no
effect.
what i have to do? whats wrong?
thx for your help
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en