Wiki : StandardModuleFunctions
Documentation Home :: Categories :: Index :: Recent Changes :: Comments :: Search :: Help :: Login/RegisterStandard Module functions
In order to ensure consitency, inter-operability, easier debugging and cleaner code it's recommend that, wherever necessary and possible, all modules provided certain standard functions using a set naming convention. The names and purpose of these functions are demonstrated in the Example and ExampleDB? modules.
User GUI functions
- view? - this function should provide the user with an overview of items available.
- display? - this function should display an individual item.
User API functions
- get? - this function should return a single item.
- getall? - this function should return a set of items (either all or a paged view depending on user input).
- count? - this function should return a count of matching items.
Admin GUI functions
- view? - this function should display an administrative overview of items held by the module.
- new? - this function should display a form for creating a new item.
- create? - this function should process the new item form passing the processed form onto the create admin API for entry into the DB.
- modify? - this function should display a form for modifying an item.
- update? - this function should process the modify item form passing the processed form onto the update admin API for entry into the DB.
- delete? - this function should display and process a form for deleting an item passing the processed form onto the delete admin api for removal from the DB.
- modifyconfig? - this function should display a form for modifying the configuration of the module..
- updateconfig? - this function should process the modifyconfig form.
Admin API functions
- create? - this function should create an item in the DB
- update? - this function should modify and item in the DB
- delete? - this function should delete an item from the DB
- getlinks? - this function should return an array of links to the available administrative functions of the module.
CategoryDeveloperDocs
