Archives


Master Symfony2 fundamentals

Be trained by SensioLabs experts (2 to 6 day sessions -- French or English).
trainings.sensiolabs.com

Symfony hosting done right

ServerGrove, outstanding support at the right price for your Symfony hosting needs.
servergrove.com

L'audit Qualité par SensioLabs

200 points de contrôle de votre applicatif web.
audit.sensiolabs.com

gravatar
Admin generator documentation added
by Francois Zaninotto – February 27, 2006 – 2 comments

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...

Add a Comment

You must be connected to post a comment.

Comments RSS

  • gravatar
    #1 z01d said on the 2006/02/28 at 09:46
    Nice!
  • gravatar
    #2 jason rowe said on the 2006/03/08 at 10:41
    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?