makki
makki

Reputation: 2107

remove 'new' action from backend application module, symfony

I have created a module in backend application. need to remove the 'new' action, but unfortunately i don't know how to remove this from generator.yml :(

Upvotes: 1

Views: 2279

Answers (1)

d.syph.3r
d.syph.3r

Reputation: 2215

You can specifiy the actions available on the various views, in this case the list view. I have removed the options from the generator config that are not applicable.

  # generator.yml
  generator:
    class: sfDoctrineGenerator
    param:
      config:
        list:
          actions:
            {}

By setting an empty array on the list:actions setting you can remove the link to the new action.

See 'Lists' section at http://www.symfony-project.org/reference/1_4/en/06-Admin-Generator#chapter_06_actions

Upvotes: 3

Related Questions