mirror of
https://github.com/Oreolek/debug-toolbar.git
synced 2024-04-25 21:59:17 +03:00
Improve custom's sections rendering
This commit is contained in:
parent
faa657a088
commit
3f6a4c854e
|
@ -213,9 +213,14 @@ abstract class Kohana_Debugtoolbar {
|
|||
foreach(self::$_custom_sections as $section)
|
||||
{
|
||||
list($title, $data, $logo) = $section;
|
||||
if ( ! is_string($data) && is_callable($data))
|
||||
{
|
||||
$data = call_user_func($data);
|
||||
}
|
||||
|
||||
$result[] = array(
|
||||
'title' => is_callable($title) ? call_user_func($title) : (string)$title,
|
||||
'content' => is_callable($data) ? call_user_func($data) : $data,
|
||||
'title' => ! is_string($title) && is_callable($title) ? call_user_func($title) : (string)$title,
|
||||
'content' => is_string($data) ? $data : Debug::dump($data),
|
||||
'logo' => $logo
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue