What is Calling the Add Function?
Permalink1. Dispatcher runs when adding a block.
2. Dispatcher runs a require for startup/tools.php.
3. Tools runs a require for tools/add_block_popup.php.
4. This file gets the block type class for the block type you selected and calls BlockView's render function passing along the 'add' command, the block type and an array of supporting objects.
5. BlockView then renders, calling the block type controller's setupAndRun function with the 'add' argument.
6. The controller then calls the runTask function with the add argument.
7. The runTask function then calls the block controller's add function.
I was trying to figure this all out manually with my code in Vim. I used NetBeans to step through the process and that helped a lot.
See the code:
https://github.com/concrete5/concrete5/blob/7248d39e53e6fa52b86329b3...