Skip to content
ckimrie edited this page Mar 14, 2013 · 14 revisions

Creating custom ExpressionEngine Debug Toolbar (EEDT) panels starts with creating an extension that listens for the ee_debug_toolbar_add_panel hook. Your extension then simply needs to create an instance of the Eedt_panel_model class and customise it to your needs (see the Creating custom debug panels).

The Eedt_panel_model API is your gateway for creating a fully customisable debugging front end.

Important Concepts

Not just panels Although the name might be misleading, if you are looking to create a front end debugging widget that does not conform to the 'panel' paradigm (ie: open/closes on toolbar button click) you still need to create an Eedt_panel_model instance. Once instantiated, simply change the panel injection point to be outside the toolbar.

Views Its always important to keep your code organised, so we recommend you use CodeIgniter's view loading system to load your panel contents. In order to have your panel contents loaded within your panel you must return your view as a string, so ensure that when calling the set_panel_contents method, you call CodeIgniter's load->view() method with a third argument of TRUE to indicate to the loader that you want the view returned as a string.

Eedt_panel_model API

set_name()

set_name($name)
  • $name - Panel name. Used for panel identification in eedt.js.
  • return - Null

Set panel short name

get_name()

get_name()
  • return - String

Get panel short name

get_target()

get_target()
  • return - String

set_button_label()

set_button_label($label)

get_button_label()

get_button_label()

set_button_icon()

set_button_icon($filename)

get_button_icon()

get_button_icon()

set_button_icon_alt_text()

set_button_icon_alt_text($text="")

get_button_icon_alt_text()

get_button_icon_alt_text()

set_panel_contents()

set_panel_contents($html = "")

get_panel_contents()

get_panel_contents()

set_panel_css_class()

set_panel_css_class($css)

get_panel_css_class()

get_panel_css_class()

add_js()

add_js($filename, $page_load = FALSE)

get_js()

get_js()

get_page_load_js()

get_page_load_js()

add_css()

add_css($filename, $page_load = FALSE)

get_css()

get_css()

get_page_load_css()

get_page_load_css()

set_injection_point()

set_injection_point($injection_point = Eedt_panel_model::PANEL_IN_TOOLBAR)

get_injection_point()

get_injection_point()

set_show_button()

set_show_button($enabled = true)

show_button()

show_button()

get_panel_fetch_url()

get_panel_fetch_url()

set_panel_fetch_url()

set_panel_fetch_url($panel_fetch_url)

Clone this wiki locally