Blue Horn New Zealand Web Design & Development (PHP 5, MySQL, Symfony Framework, Apache, Linux)

18Sep/090

Susan Mofo: An Author, a Poet and a Health Practitioner

Susan Mofo is an author, a poet, and a health practitioner. And at the moment she is working to finish her first music CD! Susanmofo.com is a simple but effective website for Susan's official online presence, to promote her book, CD, and physiotherapy.

susanmofo.com

5Sep/090

sfDoctrine Behavior: Unique Random Column

I wanted a Symfony doctrine behavior / template to add a column that contains unique random string. I searched around but found nothing, so I developed these doctrine behavior / template for generating unique random string.

31Aug/0912

Symfony 1.2 sfForm formatter to add stars on required fields

The following is a form formatter class I developed to automatically add stars * on required fields. Feel free to use it and let me know if it can be improved.

You might ask, why not just use setLabels?

Firstly, if you already set required fields to true/false in setValidators, why do you have to add the stars manually again in setLabels? It just doesn't make sense!

Secondly, using setLabels to add stars is interfering with language translation.

Thirdly, this is I believe a proper (or proper-ish?) way to do this kind of things with sfForm.