I’m trying to remove the “Delete” action from an admin generated edit page. I realize that I can create my own template and remove the action from there, but I figured that there must be a way to remove it using the generator.yml file.
My generator.yml file is:
generator:
class: sfDoctrineGenerator
param:
model_class: Poem
theme: admin
non_verbose_templates: true
with_show: false
singular: ~
plural: ~
route_prefix: poem
with_doctrine_route: true
actions_base_class: sfActions
config:
actions: ~
fields: ~
list: ~
form: ~
filter: ~
edit:
actions: {}
new: ~
And yet, the edit page still shows the “Delete”, “Back to list” and “Save” actions at the bottom of the page.
How can I control which actions are displayed?
Try this:
Add any other actions you may have, just leave off the delete action. I have a highly customized generator.yml file, but didn’t remove the delete link, so I tried the code and it appeared to work as requested.