/** * Sends an event via the EventDispatcher to allow other code to extend the toolbar. * * @param EventDispatcher $dispatcher Core event manager. */ function __construct(EventDispatcher $dispatcher) { $this->dispatcher = $dispatcher; \PageUtil::addVar('javascript', 'prototype'); \PageUtil::addVar('javascript', 'javascript/debugtoolbar/main.js'); \PageUtil::addVar('stylesheet', 'style/debugtoolbar.css'); // allow modules and plugins to extend the toolbar $event = new GenericEvent($this); $this->dispatcher->dispatch('debugtoolbar.init', $event); }