Search
Categories
- Getting Things Done (RSS) (3)
- SEO (RSS) (1)
- Web Development (RSS) (86)
Writing this post down as a note to self about using sfValidatorCallback.
Step 1: add the sfValidatorCallback to the widget
public function configure()
{
$this->widgetSchema['my_field'] =
new sfWidgetFormTextArea(array(‘required’ => false));
// add the validator
$this->validatorSchema['my_field'] = new sfValidatorCallback(
array(‘callback’ => array(
[...]
I am a big fan of using plugins in symfony especially that are well written and save me a bunch of time implementing some bog standard functionality. SfDoctrineGuardPlugin is an example of one such plugin but due the generic nature of the signup process there is a lot left to be implemented even after using [...]
Recently I had an issue on one of my work websites where the database schema was setup in Latin-1 encoding, this was fine till the encoding of the website was also set to iso-8859-1 and nothing fancy was going on. However later in the last few months, I had been doing some development which required [...]
To typically upgrade the version of symfony, I usually run the command
# sudo pear upgrade symfony/symfony
But it seems that the channel details have updated you would require updating that first and then you can upgrade to symfony 1.4. This is what i did.
rp@devbox:/usr/share/php/symfony$ sudo pear channel-update pear.symfony-project.com
Updating channel "pear.symfony-project.com"
Update of Channel "pear.symfony-project.com" succeeded
rp@devbox:/usr/share/php/symfony$ sudo pear [...]
If your precious evening hacking time has been wasted by this useless error message:
rp@devbox:trunk$ php symfony –trace doctrine:build-all-reload –no-confirmation
>> doctrine dropping databases
>> doctrine Successfully dropped database f…octrine" named "secret_project"
>> doctrine creating databases
>> doctrine Successfully created database f…octrine" named "secret_project"
>> doctrine generating model classes
[Doctrine_Parser_Exception]
Unable to parse string: [...]
a quick post to note how to truncate the table using propel:
Propel::getConnection(‘connection_name’)->executeUpdate(‘TRUNCATE TABLE put_table_name_here’);
My development process involves using doctrine and svn. Documenting my development steps to make sure I can put this is some sort of build script in future.
Creating svn directories
svn mkdir -m "create default directories" http://svn.clients.rajatpandit.com/project-name/trunk http://svn.clients.rajatpandit.com/project-name/tags http://svn.clients.rajatpandit.com/project-name/branches
Checkout these directories locally:
svn co http://svn.clients.rajatpandit.com/project-name/ .
Move to the trunk directory
cd trunk
Creating a new project
$ symfony generate:project brp
$ [...]
This is going to be a quick post as I needed to write this done as its quite useful for anyone who either doesnt like or doesnt understand how the complex criteria objects work.
If you want to write code for a criteria object for the SQL statement which is something like this.
SELECT field1, field2 from [...]
The recent project that I am working on for a client has taught me more about svn than I ever did because of the complex nature of the product. It has been going through a proper product development cycle which involves quick iteration of features and sometimes, such dramatic changes that can make the entire [...]
Recent Comments