I'm learning Joomla development and I have so far been able to understand how to create subcontrollers, models, views, and layouts. Now I'm trying to understand how I can pass control from the subcontroller to a view when an admin clicks on the "New" toolbar icon. To do this I've been going through the Banners component that shipped with Joomla.
Here's where I'm a little bit lost and hope someone can make me understand.
/views/banners/view.html.php suggest that there is a subcontroller banner with the task add:
if (count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0)
However, upon inspecting /contollers/banner.php I cannot find any add task assigned to the toolbar icon (or any of the task assigned to the menu for that matter).
Furthermore, clicking on the "New" icon redirects me to index.php?option=com_banners&view=banner&layout=edit
I just don't understand where the redirect is occuring because I cannot find any reference point to banner.add. Any advice on what the heck Joomla is doing in the background?