Go to Google Groups Home    doctrine-user
Re: how can I disable a record hook

Qineer <qin...@gmail.com>

go on,  In some times, I don't want to call the preSave method, How
can I disable this hook?

However, I know how to disable an record listener, like this:  $table-

>getRecordListener()->setOption('disabled', true);

On Jul 3, 1:53 pm, Qineer <qin...@gmail.com> wrote:
> for example:

> class Table extends baseTable()
> {
>     public function preSave(){

>     }

> }

> $table = new Table();
> $table->name = 'new name';
> $table->save();