Symfony Admin Generated Forms – One to Many (1:M)
Found a great article on how to edit forms to allow the user to add as many rows to a 1:M form display as they want…
Check it out @ http://dev.markhaus.com
No comments yet.
No trackbacks yet.
Symfony – Standard API for Logging
As a developer you probably already know how important the concept of logging is. Logging greatly reduces the time it takes to debug defects which means you can spend more time developing fun stuff like new features. The following is a simple tip to assist in your debugging efforts.
According to symfony, you can access the [...]
Symfony 1.4 – Rename Application
July 20, 2010 - 7:32 pm
Tags: Symfony
Posted in Symfony 1.4 | No comments
If you ever need to rename an application you can follow the directions given here: http://fabien.potencier.org/article/22/a-symfony-tip-rename-a-symfony-application. The directions work well for Symfony version 1.2 but if you are running 1.3+ you will also need to follow these extra steps:
Rename: app/<app_name>/config/<old_app_name>Configuration.class.php TO app/<app_name>/config/<new_app_name>Configuration.class.php
Edit: app/<app_name>/config/<new_app_name>Configuration.class.php to:
class <new_app_name>Configuration extends sfApplicationConfiguartion
Now just clear cache and load your site through [...]
Symfony – Autoload.yml – Basic Usage
June 2, 2010 - 1:12 pm
Tags: Symfony
Posted in Symfony, Symfony 1.4 | No comments
Autoloading is the term used to describe the process where class files are loaded at the first http request (and cached for subsequent requests). The main benefit of autoloading is that you don’t need to add a bunch of ‘require_once’ calls to your classes to get things working, they are all autoloaded for you. Some [...]
Symfony – Saving Metadata During Form Save (sort ids)
April 6, 2010 - 9:34 am
Tags: Symfony
Posted in Symfony | 18 comments
A few months ago I wrote an article about how to edit the sfFormExtraPlugin to respect metadata for ‘associated’ (selected) items. Back then I was able to get this to work ‘out-of-the-box’ because MySQL was playing nicely, but after a few weeks I found that the sort order wasn’t being respected (something arbitrary about mysql’s [...]
Symfony – Upgrade from 1.2 to 1.3 – Filters.yml
If you are upgrading from version 1.2 to version 1.3 of symfony you may run into some odd filter issues after following their online guide @ http://www.symfony-project.org/tutorial/1_4/en/upgrade.
The main problem I had with this upgrade was the syntax construct for filters.yml has completely changed. This was a struggle b/c there was no mention of the change [...]
Symfony – Push to Production Checklist
April 5, 2010 - 8:26 am
Tags: Symfony
Posted in Symfony | No comments
There is a great site out there that offers up a checklist you should conduct before launching your symfony project to production, check out the following link:
http://symfony-check.org/
One cool note that is definitely worth mentioning is the “Display an unavailable message during maintenance operations” check. Basically you can configure a setting in your settings.yml file which [...]
Doctrine – Fetching Objects
March 2, 2010 - 9:32 pm
Tags: Doctrine, Symfony
Posted in Doctrine | No comments
Last night I was reading up on doctrine and came across a link to some basic, yet helpful info.
You should always use array hydration when you only need to data for access-only purposes, whereas you should use the record hydration when you need to change the fetched data.
Interesting. I’ve always tried to always use objects [...]
Subversion – Add / Remove Multiple Files at same Time
February 26, 2010 - 11:09 am
Tags: Subversion, Symfony
Posted in Subversion | No comments
Working within frameworks like Symfony you may find yourself having to add/remove multiple files at a time (adding a new module) to/from a symfony repository. Instead of doing per file, use one of the following commands:
svn remove $(svn status | grep ‘^\!’ | sed ’s/^\! *//’ | xargs) #remove multiple files
svn add $(svn status | [...]
Symfony – Adjust Widget Order
February 25, 2010 - 10:11 am
Tags: Symfony
Posted in Symfony | No comments
If you are using the Symfony form framework you may have experienced issues with the order of widgets as they appear on the form. For example say you have a user table with the following columns: first_name, last_name, and dob (date of birth), and you execute the symfony ‘build-forms’ command and view your form you [...]
Symfony – Override Doctrine Methods
February 8, 2010 - 10:38 am
Tags: Symfony
Posted in Symfony | No comments
Ran into a situation where I had to override the Doctrine Record::Link() method and was having a tough time trying to figure out the best approach. A few minutes googling and came across the following article: http://snippets.symfony-project.org/snippet/373 .
It goes over how to add your custom (override) class to the chain of extends within the symfony [...]
