Thanks Fabian, this pointed me in the right direction. Now I have overriden initialize() in my application configuration and added the event connection there. Since I now connect the event after the propel plugin does, my 'db' panel now overwrites the one from the propel plugin :)
public function initialize() { parent::initialize(); $this->dispatcher->connect('debug.web.load_panels', array($this, 'configureWebDebugToolbar')); } Thanks for the help, Andy. On Jun 3, 10:12 am, Fabian Lange <fabian.la...@symfony-project.com> wrote: > Hi, > this is because the db panel is not created by (core) symfony. > It is created by the (core) PropelPlugin: sfWebDebugPanelPropel > > It listens to the debug.web.filter_logs event and then sets the DB Panel. > > so if you are setting the DB panel before proepl is active, propel > overwrites you. > > I think this partially intended, but we might think of it being what we want > it to be :-) > > Fabian > > On Wed, Jun 3, 2009 at 10:54 AM, arri...@gmail.com <arri...@gmail.com>wrote: > > > > > hi - i think I may have found a bug in overriding the db panel in the > > web debug toolbar. I've been following > > >http://www.symfony-project.org/blog/2008/08/27/new-in-symfony-1-2-cus... > > and have created a new class, ctWebDebugPanelPropel. I want this to > > replace the db panel that is already there. > > > public function configureWebDebugToolbar(sfEvent $event) > > { > > $webDebugToolbar = $event->getSubject(); > > $webDebugToolbar->setPanel('db', new ctWebDebugPanelPropel > > ($webDebugToolbar)); > > } > > > This doesn't override the panel, but keeps the original. However, if i > > change the name to 'newdb' from 'db' it adds another panel with my > > mods. In contrast, if i change the name to 'logs' this *does* > > overwrite the logs panel and replaces it with my new panel. > > > Looks like the 'db' panel is added after the initial configuration, > > overwriting the one that is there. Not a massive issue as I can use > > the 'newdb' name to add extra panel and have 2 db panels, but it would > > be nice if I could replace the existing one somehow. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to symfony-devs@googlegroups.com To unsubscribe from this group, send email to symfony-devs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en -~----------~----~----~----~------~----~------~--~---