Thank you very much for answering, guys. Now I'm ansious for having that 
command!

El viernes, 1 de marzo de 2013 19:36:29 UTC-3, Wouter J escribió:
>
> First of all, this should not be merged into Symfony core, but into the 
> SensioGeneratorBundle.
>
> As of Symfony2.2, there will be a generate:controller command which 
> generates routes, actions, templates and tests for you. That is already the 
> command you want to use for this.
>
> Adding a section is just to specific, it can be used in your project only 
> and is not likely to be used in other sites, as adding sections is 
> different on every project.
>
> -- Wouter J
>
> Op vrijdag 1 maart 2013 14:43:10 UTC+1 schreef Nico Rodsevich het volgende:
>>
>> I want to create a command that automatically creates and modifies all 
>> the files needed to make a new section for the web project.
>> Suppose we want to add a new section to our web project:
>>
>>
>>
>> <https://lh5.googleusercontent.com/-ORitUWtPoj4/UTCp_3RhMvI/AAAAAAAAACM/ZNqtDQwnqec/s1600/fab_home.png>
>>
>> Figure 
>> 1<https://lh5.googleusercontent.com/-ORitUWtPoj4/UTCp_3RhMvI/AAAAAAAAACM/ZNqtDQwnqec/s1600/fab_home.png>
>>
>>
>> We use the command line to generate the section: (this is just te main 
>> idea, the command will be much more powerful)
>>
>>
>>
>> <https://lh5.googleusercontent.com/-J2GWX59Zu4I/UTCoajVOelI/AAAAAAAAACE/5C691Yj-TjI/s1600/fab_consola.png>
>>
>> Figure 2
>>
>> The command would work this way:
>>
>>
>>    1. Add the route /contacts to the routing.yml file of the bundle (if 
>>    the project is made with YAML, otherwise it does the same with the 
>> Bundle's 
>>    routing system)
>>    2. If it doesn't exists already, create the ContactsAction() function 
>>    in the ContactController (or create the entire controller if it doesn't 
>>    exists already)
>>    3. The command asks for the main layout of the views and create the 
>>    contacts.html.twig view with the include of the layout/base.html.twig<not 
>>    shown in Figure 2>
>>    4. Automatically searchs in the main layout for a comment like {# 
>>    @SECTION: <a href={{ path('%section%') }}>%section%</a> #} and adds 
>>    in the same line 
>>    the link in the way provided in the comment (in this case: <a href={{ 
>>    path('contacts') }}>contacts</a>) (does nothing if the comment is not 
>>    found)<not shown in Figure 2>
>>
>> After the modifications done in the contacts.html.twig for making the 
>> section shows what it should show, the project would be like this:
>>
>>
>>
>> <https://lh4.googleusercontent.com/-k9CmkQwuc_4/UTCv1cTmuRI/AAAAAAAAACY/F_CLYaQq-2M/s1600/fab_contacts.png>
>>
>> Figure 3
>>
>>
>> I would like to know opinions about this idea and what must it have in 
>> order to be included in the main Symfony Core, also any other ideas that 
>> would make it stronger und more usefull for the Sf2 community
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>

-- 
-- 
If you want to report a vulnerability issue on Symfony, please read the 
procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Symfony developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to