Twig Bake Template variables origin - cakephp 3.x

Good morning, I am creating my own cake bake template, I have it in src/Template/Bake. It works fine, but I want to know where can I find the class that send variables to the twig view.
Example:
question
I want to know where the variables “fields”, “schema” and “modelObject” values come from.

Thank you.
Have a nice day.

Here you go:

1 Like

Thank you, do you know if I can copy this files to some directory and modify them? Like I did with the bake templates?

Why would you do that?
and I’d recommend extending them instead, but I do not know out of my head how to.

We want to add some extra info to the fields from a database, like row position, column position, bootstrap colunm size, etc.
What do you mean when you say “exteding them”?
I need to change the Bake.filterFields() method, so it can make a query to the database and load the fields properties and use them in the twig template.
Thanks.

@marlonfal You fix your issue? If so, what was the solution?