24 articles Symfony Page 4 / 5

Fabien Potencier is a mad genius, he’s the man behind Sensio Labs and the Symfony PHP framework, which I have grown to really appreciate. For one, any business with a web development team needs to be on a framework. Period. Collaboration will improve exponentially while development time will decrease as your systems become more stable and scalable. PHP frameworks are a necessity for any company with serious skin in the web!

Looking for a PHP developer, a Symfony expert or Wordpress web developer? Perhaps a business system architect that specializes in scalable MySQL business system design and deployment? We have reliable, fast and professional developers that meets your organization’s needs! Contact us for your next web development project and schedule a free consultation today.

Symfony: FOS User Bundle, check if user is logged in

If you are using the "FOSUserBundle" in Symfony, here is how you can check if a user is logged in: For more information about user authentication in Symfony, visit the Friends of Symfony website at:  https://github.com/FriendsOfSymfony/FOSUserBundle. If you are an organization in the Jacksonville Northeast Florida area looking for open source PHP web developers…

Adding custom form field errors within controllers in Symfony

Every field in Symfony now is an instance of a form object.  To add custom errors in the controller upon form submission, you have to access the form object of the field then add the custom error to it.

Symfony service container helps keep code organized, functions segregated, and your controllers lean and mean!

In Symfony, making a service means different classes and their functions can be called on as needed from the controller without cluttering up your controller and allowing you to separate useful code that can be called on from other places later.  That's modularity, efficiency and the DRY principle (Don't Repeat Yourself). Here is a simple…

Adding custom errors in form fields in Symfony controllers

Every field in a form in Symfony is an instance of the parent form. To add a custom error to the form, you must access the form object of the field then add an error into it. Here is how you can embed a custom error to a form field:

Symfony: Access form collection variables from the parent form

This usually goes in the controller after checking if the form submitted is valid: