What i will do is outline what it does (functionally) and then outline how it's been put together in terms of files and configuration.
Functionality
There are 2 screens; the first presents a search input box in which the user enters some text; the second screen presents the results, if there are any.
The search uses the above text to search JOS_USERS using the above string comparing against the NAME column.
Implementation
Using the MVC pattern, Joomla separates the functionality into several pieces.
Entry Point
The entry point file simply creates an instance of the controller and tells it to run the method pointed to by the requests var parameter (or defaults to display).
Controller
Has methods to pull together the model, views etc. In this case we have two methods:
- display - default method
- exec_search - called from the search parameter form; gets the view, assigns model to the view and calls the views display method
Views
The views pull together data and present the template. There are two; one default one does nothing and shows the default template (search input screen); a second which executes the search using the inputted screen data and puts the results into the JView class.
Models
There are 2 models; the default one which simply invokes the default template; a second which uses the search term, executes a search and returns the rows.
No comments:
Post a Comment