A hint
You can use the same Smarty funnction in s/Frontend/Bare/frontend/index/sidebar-categories.tpl
And convert it to php fmunction and use it in your plugin to loop throug all the child categories tree array
A hint
You can use the same Smarty funnction in s/Frontend/Bare/frontend/index/sidebar-categories.tpl
And convert it to php fmunction and use it in your plugin to loop throug all the child categories tree array