The Panel Model - mithra62/ee_debug_toolbar GitHub Wiki
The DebugToolbar\Panels\Model
API is your gateway for creating a fully customizable debugging front end.
DebugToolbar\Panels\Model
Example
$panel = new DebugToolbar\Panels\Model;
$pane->setName('my_panel_name');
Methods
Below are the available methods to you.
setName()
setName($name)
- $name - Panel name. Toolbar short name (used in CSS and JS targeting)
- return - Null
Set panel short name
getName()
getName()
- return - String
Get panel short name
getTarget()
getTarget()
- return - String
Returns the auto-generated data-target used in DOM targeting
setButtonLabel()
setButtonLabel($label)
- $label - Panel label
- return - Null
Set panel short name
getButtonLabel()
getButtonLabel()
- return - String
setButtonIcon()
setButtonIcon($filename)
- $filename - Panel label
- return - Null
The URL to the panel icon image
getButtonIcon()
getButtonIcon()
- return - String
setButtonIconAltText()
setButtonIconAltText($text="")
- $text - Panel Icon Alt attribute
- return - Null
Set panel short name
getButtonIconAltText()
getButtonIconAltText()
- return - String
setPanelContents()
setPanelContents($html = "")
- $html - The panel content
- return - Null
The content to appear in your panel.
getPanelContents()
getPanelContents()
- return - String
setPanelCssClass()
setPanelCssClass($css)
- $css - Valid CSS Class
- return - Null
The CSS Class to attach to the panel button wrapper
getPanelCssClass()
getPanelCssClass()
- return - String
addJs()
addJs($filename, $page_load = FALSE)
- $filename - URL to JS file
- $page_load - Flag to have JS executed on page load
- return - Null
Any JS files the panel should load
getJs()
getJs()
- return - Array
The array contains the "ondemand" loading JS
getPageLoadJs()
getPageLoadJs()
- return - Array
The array contains the page load JS
addCss()
addCss($filename, $page_load = FALSE)
- $filename - URL to CSS file
- $page_load - Flag to have CSS executed on page load
- return - Null
Any CSS files the panel should load
getCss()
getCss()
- return - Array
The array contains the "ondemand" loading CSS
getPageLoadCss()
getPageLoadCss()
- return - Array
The array contains the page load CSS
setInjectionPoint()
setInjectionPoint($injection_point = Model::PANEL_IN_TOOLBAR)
- $injection_point - Placement of your HTML
- return - Null
Where in the Toolbar HTML should your output be placed. Should use constant of:
-
Model::PANEL_IN_TOOLBAR
-
Model::PANEL_BEFORE_TOOLBAR
-
Model::PANEL_AFTER_TOOLBAR
//example $panel->setInjectionPoint(Model::PANEL_IN_TOOLBAR);
getInjectionPoint()
getInjectionPoint()
- return - int
setShowButton()
setShowButton($enabled = true)
- $enabled - Flag to enable/disable the panel button
- return - Null
Should the Toolbar have a button for the panel?
showButton()
showButton()
- return - Bool
setPanelFetchUrl()
setPanelFetchUrl($panel_fetch_url)
- $panel_fetch_url - URL to fetch Panel Content
- return - Null
Where to get the panel contents if the panel doesn't execute on initial page load.
getPanelFetchUrl()
getPanelFetchUrl()
- return - String