You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Therein lies the conundrum: $viewsPath will either be the default SYSTEMPATH . 'Debug/Toolbar/Views/' (where developers should not inject their own _packagename.tpl) or some other path which will lack the view templates for core Collectors.
My guess is that the User Guide is reflecting a step in the direction of making it easier to create custom Collectors (by directly return HTML from display()), but that change hasn't been implemented in the Toolbar class yet.
The text was updated successfully, but these errors were encountered:
The User Guide outlines creating a custom Collector for the Debug Toolbar:
https://codeigniter4.github.io/CodeIgniter4/testing/debugging.html?#creating-custom-collectors
However, the Toolbar service takes a static
$viewsPath
fromapp/Config/Toolbar.php
and then toolbar.tpl.php uses this to render a view template for each Collector:https://github.com/codeigniter4/CodeIgniter4/blob/develop/system/Debug/Toolbar/Views/toolbar.tpl.php#L139
Therein lies the conundrum:
$viewsPath
will either be the defaultSYSTEMPATH . 'Debug/Toolbar/Views/'
(where developers should not inject their own_packagename.tpl
) or some other path which will lack the view templates for core Collectors.The Guide states "
display()
should return a string of HTML" but it actually needs to return an array: https://github.com/codeigniter4/CodeIgniter4/blob/develop/system/Debug/Toolbar/Collectors/BaseCollector.php#L237)My guess is that the User Guide is reflecting a step in the direction of making it easier to create custom Collectors (by directly return HTML from
display()
), but that change hasn't been implemented in the Toolbar class yet.The text was updated successfully, but these errors were encountered: