I have added a setting to my config.yml file as such: app.config: contact_email: somebody@gmail.com ... For the life of me, I can’t figure out how to read it into...
I looked around for the code to get the current path in a Twig template (and not the full URL), i.e. I don’t want http://www.sitename.com/page, I only need /page....
I’m aware of questions like this, where people tend to discuss the general Symfony 2 concept of bundle. The thing is, in a specific application, like, for instance, a...
I am very new to symfony. In other languages like java and others I can use request.getParameter('parmeter name') to get the value. Is there anything similar that we can...
I’m using Doctrine’s QueryBuilder to build a query, and I want to get the total count of results from the query. $repository = $em->getRepository('FooBundle:Foo'); $qb = $repository->createQueryBuilder('n') ->where('n.bar =...
This question already has answers here: Is it .yaml or .yml? (4 answers) Closed 3 years ago. I read them on YAML-wikipedia but not really understood the main difference...
One of my fields in one of my entities is a “datetime” variable. How can I convert this field into a string to render in a browser? Here is...
How do I get the current route in Symfony 2? For example, routing.yml: somePage: pattern: /page/ defaults: { _controller: "AcmeBundle:Test:index" } How can I get this somePage value? 13...
I am new to symfony2 and reading symblog. In third chapter while trying with data-fixtures I tried the command: php composer.phar update but I got the error: Could not...
I’m trying to make a simple example in order to learn how to delete a row from a parent table and automatically delete the matching rows in the child...