Par un détour à Yoda

{ }


Aller au contenu | Aller au menu | Aller à la recherche

Mot-clé - symfony

[Symfony] Coupling sfDoctrineGuardPlugin

Recently I created a quite sensible application using symfony 1.4. As many people, I chose sfDoctrineGuardPlugin as authentication/password recovery/account managing system. But even with this piece of software, you are... lire la suite

Symfony - Doctrine: Use a fully UTF8

First, edit your config/databases.yml and add : [yml] all: doctrine: class: sfDoctrineDatabase param: dsn: mysql:socket=/var/run/mysqld/mysqld.sock;dbname=mydb username: mydb password: mypassword encoding: utf8... lire la suite

Doctrine: Howto bypass the SoftDelete

For one of my projects I have to check if a record already exists in my database, deleted or not. The preDqlSelect looks like this : /** * Implement preDqlSelect() hook and add the deleted flag to all queries for which... lire la suite

Symfony: Validate fields depending of

It's possible, when validating a form, to check if a field is correct dependently of an other field's value. First, in your configure method, after the declaration of your validators, add :... lire la suite

Symfony: change the default type of your

Hey, yes it's possible to change the default type of your primary keys with a simple configuration Open your config/databases.yml. It should looks like this : [yml] # You can find more information about this file on the... lire la suite

Symfony, tasks and return values

In symfony, it's possible to return a value in your execute() method. Let's create a test task : ┌─(yoda@box)(09:46:59) └─(~/var/www/test)-> ./symfony generate:task test >> task Creating... lire la suite

[Symfony] Overwrite a value in a form

It happen sometimes that you have to set/override a value within a form but without using a hidden field (that can be overridden) Here is a short solution to set the user id in the object we are going to save. Let's say... lire la suite

[Symfony] Load an sql dump within a task

I recently had a problem when loading fixtures in my symfony project. I was loading cities, about 37 000 of them, and the doctrine:data-load was extremly slow (about 5 minutes). I finally found a solution to load an sql... lire la suite

My first plugin for symfony

Hey, I just uploaded my first plugin for symfony ! This plugin is a simple wrapper for a jQuery Carousel found at lire la suite

Display lastest dotclear posts in

Here is a little tip to display the latest posts of your dotclear blog in your symfony website. Create a connection If your blog database is in an other database than symfony's one, you need to create a connection in the... lire la suite