How to manipulate the child items of the tree menu in cakephp 3?

I’m having doubts about manipulating the child menu items to improve the display style.

I am currently generating according to documentation:

function index() {

       $this->set('list', $this->Categories->find('treeList'));
       $this->set('Categories', $this->Categories->find("all"));
foreach($list as $item){
echo "<li>".$item."</li>";

The display is in this format:

My Categories

I tried:

$this->set('list', $this->Categorias->find('children', ['for' => 1])->find('threaded')->toArray());

But that way he only gets the parent menu.

If I can manipulate the child items I can generate a dropdown style or something to improve the menu. I appreciate any comments.

Friends, I managed to get all the nodes with the id equal to 0 (parent menu) like this:

$children = $this->Categories->find('children', ['for' => 1])->find('threaded')->toArray(); 


foreach ($children as $child) {
echo "{$child->nome} \n"; 

I am trying to catch the children of these items in another loop. This way I believe that I can manipulate the style and leave the menu the way I want. Any tips to get these child items from the menus being displayed? Thanks for the help!