Creating a tag cloud in symfony

As you can see, I've created a tag cloud implementation here on my website. For this, I actually started writing a plugin, and I'm actually still working with that one here. But since the functionality was already implemented in another plugin as well, after a short discussion it was decided that my more limited implementation (just the tag cloud) would be moved to the snippets part of the symfony website as a helper.

So now, my tag cloud is available as a helper, here . Feel free to use it if you want, it's pretty straightforward. It's a simple call to the helper class in your template:


Where $tags is an array with a predetermined format, being tagname => weight, such as this:

array('tag1' => 10, 'tag2' => 15, 'tag3' => 4); 

A simple stylesheet then determines the size of the various steps in the cloud. It's easy, and it works ;)