Symfony: forms

Rendering the Form One of the simplest ways is to render the form tags and use form_widget() to render all of the fields: {{ form_start(form, {’attr’: {’class’: ‘my-form-class’} }) }} {{ form_widget(form) }} {{ form_end(form) }}{{ form_start(form, {‘attr’: {‘class’: ‘my-form-class’} }) }} {{ form_widget(form) }} {{ form_end(form) }} If you need more control over how
Continue reading Symfony: forms

Symfony: Services

Naming and Format Place service classes inside src/YourBundle/Utils/. Let the service container create new service objects for you via configuration: # app/config/config.yml services: my_testservice: class: MyApp\MyBundle\MyTestService arguments: [myargument]# app/config/config.yml services: my_testservice: class: MyApp\MyBundle\MyTestService arguments: [myargument] An instance of the MyApp\MyBundle\MyTestService object is now available via the service container. The container is available in any traditional
Continue reading Symfony: Services