Blog

Admin generator documentation added

« Back to the Blog

Categories

Feeds

feed Posts feed

comments feed Comments feed

Be trained by symfony experts
Dec 10: Paris (1.1 - Francais)
Dec 10: Atlanta (1.1 - English)
Dec 17: Montreal (1.1 - Francais)
Jan 21: Paris (1.1 - Francais)
Feb 18: Paris (1.1 - Francais)
and more...

Archives

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.

The generation chapter of the symfony book has just been updated to reflect the latest additions of symfony 0.6 in one crucial feature: The admin generator.

It describes in detail the differences between a scaffolding and an administration, why you should initiate instead of generate, and all the settings that you can change to control the administration functionnalities.

We made a few changes to the generator.yml syntax, to make it easier to use. The example given in the What's new in 0.6 has to be slightly modified to work with the latest symfony beta release (higher than 0.7.872):


    generator:
      class:              sfPropelAdminGenerator
      param:
        model_class:      Question
        theme:            default
  
        fields:
          user:             { name: Author }
          user_id:          { name: Question author }
          body:             { name: Question }
          interested_users: { name: Interested users }
          created_at:       { name: Creation date }
  
        list:
          title:            question list
          layout:           stacked
          display:          [=title, user, interested_users, created_at]
          params:           %%title%% by %%user%% on %%created_at%%
          actions:
            _edit:          -
            _delete:        -
            export:         { name: export, action: ListExport }
          max_per_page:     5
          filters:          [title, created_at, interested_users, user_id]
        edit:
          fields:
            title:          { type: input_tag, params: size=10 }
            created_at:     { type: input_date_tag, params: rich=on }
          actions:
            export:         { name: export, action: ListExport }
            _create:        -

The first project tutorial has also been updated to reflect these changes.

Now that you can create your own back-end applications in minutes, feel free to submit your configs in the wiki, together with the printscreen showing what it does.

And for those who prefer to watch instead of reading, a tutorial dedicated to the generator will soon be published, so stay tuned...

Comments comments feed

gravatar
#1 z01d said about 23 hours later

Nice!

gravatar
#2 jason rowe said 9 days later

Excellent! i really like the admin generator and love the configuration of it. I couldnt work out how to get the rich date editors to work with time as well as date though. how do i let users edit the time part of the timestamp in the interface?