I had a case where I needed to use the spooling feature of swiftmailer, which is integrated into Symfony 2.0, a php framework. Unfortunately, when I changed my configuration to spool my emails, registation emails and lost password emails would not be s...
I have only been using Symfony 2 for about 6 months now, and I have not have enough time to use very many additional bundle for Symfony. However all of the bundle that I have tested have been of superb quality.
With my limited experience, the...
This is a quick example of how to set a get variable through path(), in Twig.
In most examples I have seen online, most people will show examples of how to use 'path' in Symfony2, but only using slugs in the routing.
The Solution:
This article is going to cover how to make elasticabundle index items MUCH faster than by default. Before I made these changes, I got maybe 10-20 items to index a second. Afterwards, I was indexing about 2000 a second. So this is a HUGE improvement.
Here is an example of how to forward someone to a 404 error page in Symfony 2.0.
How to create a 404 Error
Inside of the controller include:
throw $this->createNotFoundException('That id does not ex...
To set the limit when using entitymanager->createQuery() is easy. Instead of trying to use something to the effect of "LIMIT 0,1000" on the end of your query, try ->setMaxResults(1000) on your query object.
$em = $this->g...
Tip 1
Your form must be POST, and have enctype="multipart/form-data"
<form method="POST" action="" enctype="multipart/form-data">
<input type="file" name="file" /><br />
<input type="...