Top "Symfony" questions

Symfony refers to both a PHP framework for building web applications as well as a set of components on which the framework is built.

Call PHP function from Twig template

I have a function in my controller that returns array of entities so in my twig template I do this …

symfony twig symfony-2.3
How to get the server path to the web directory in Symfony2 from inside the controller?

The question is as follows: How can I get the server path to the web directory in Symfony2 from inside …

php symfony
How to use a findBy method with comparative criteria

I'd need to use a "magic finder" findBy method using comparative criteria (not only exact criteria). In other words, I …

php symfony doctrine-orm
Accessing the logged-in user in a template

I'm using FOSuserbundle to get started with User registration https://github.com/FriendsOfSymfony/FOSUserBundle I've got it registering / logging in …

symfony twig fosuserbundle
Path of assets in CSS files in Symfony 2

Problem I have a CSS file with some paths in it (for images, fonts, etc.. url(..)). My path structure is …

php css symfony assetic
Getting all request parameters in Symfony 2

In symfony 2 controllers, every time I want to get a value from post I need to run: $this->getRequest()…

php symfony request
The EntityManager is closed

[Doctrine\ORM\ORMException] The EntityManager is closed. After I get a DBAL exception when inserting data, EntityManager closes and I'm …

symfony orm doctrine-orm entitymanager
How to use absolute path in twig functions

I have an application with Symfony2 (2.2). When I want to send a mail, I'm having trouble with the paths, which …

symfony routing twig
How to get the full url for an asset in Controller?

I need to generate some JSON content in controller and I need to get the full URL to an uploaded …

symfony assetic
How can I use break or continue within for loop in Twig template?

I try to use a simple loop, in my real code this loop is more complex, and I need to …

php symfony for-loop twig break