I am new to Joomla, I want to know how the Joomla controller passes data to the model, model to controller and controller to view. Although this might be a silly question, I really tried to find the answer. I hope I can get some help from the stackoverflow family.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
The controller picks up the view variable in the url and using these determines which view needs to be used. It then sets the view to be used. The view then calls the model to fetch the data it requires and then passes this to the tmpl to be displayed.
Below is a simple setup of how this all works together:
components/com_test/controller.php
components/com_test/views/someview/view.html.php
components/com_test/models/someview.php
components/com_test/views/someview/tmpl/someviewtmpl.php
check out this site for detailed tutorial on how to make components and modules using Joomla's MVC. Hope it helps
https://docs.joomla.org/Developing_a_MVC_Component
Also refer official joomla doc for detailed tutorial on how to make components and modules using Joomla's MVC. Hope it helps http://docs.joomla.org/Developing_a_Model-View-Controller_Component/1.5/Introduction