Symfony – Doctrine – Alterando Listener em Tempo de execução

$object->getListener()->setOption('disabled',true);

ou

$manager->setAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS, false);

 

$old_dqlc = Doctrine_Manager::getInstance()->getAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS);
Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS, false);
$record->delete();
Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS, $old_dqlc);
Tags: No tags

Add a Comment

Your email address will not be published. Required fields are marked *