Hook Reference - mithra62/ee_debug_toolbar GitHub Wiki

The Debug Toolbar (EEDT) has the below extension hooks available to modify the Toolbar.

eedt_add_panel

This hook is called in the main extension after the internal panels ($panel_data) and view variables ($vars) are processed and created. If you want to create and add panels to the EEDT you'll want to do it here.

<?php
if (ee()->extensions->active_hook('eedt_add_panel') === TRUE) {
    $panel_data = ee()->extensions->call('eedt_add_panel', $panel_data, $vars);
}

eedt_mod_panel

This hook is ran after all the panels are processed and created including third party extensions. Useful if you want to modify every panel in the EEDT.

<?php
if (ee()->extensions->active_hook('eedt_mod_panel') === TRUE) {
    $panel_data = ee()->extensions->call('eedt_mod_panel', $panel_data, $vars);
}

eedt_mod_view

This hook is ran after the remaining view data and the above 2 hooks have ran. The Panel data has been merged with the rest of the view data and is passed for modifications.

<?php
if ($this->EE->extensions->active_hook('eedt_mod_view') === TRUE) {
    $vars = ee()->extensions->call('eedt_mod_view', $vars);
}

eedt_modify_output

This hook is passed the entire raw HTML used to create the Toolbar.

<?php
if (ee()->extensions->active_hook('eedt_modify_output') === TRUE) {
    $toolbar_html = ee()->extensions->call('eedt_modify_output', $toolbar_html);
}

eedt_init_settings

This hook is used so you can store your extension's settings within the EEDT setting object. Very useful for making your settings modifiable by other extensions as well as for integrating your settings into the EEDT Settings form.

<?php
if (ee()->extensions->active_hook('eedt_init_settings') === TRUE) {
    $defaults = ee()->extensions->call('eedt_init_settings', $defaults);
    ee()->debug_settings->set_defaults($defaults);
}

eedt_settings_form

This hook allows you to add additional table rows to the settings form

<?php
if (ee()->extensions->active_hook('eedt_settings_form') === TRUE) {
    ee()->extensions->call('eedt_settings_form');
}