The code generated by CRUDigniter follows the following naming conventions :
Controller Functions
Method Name | Description |
---|---|
index() | Function to list all entries of that entity |
add() | Function to add the entity |
edit() | Function to edit the entity |
remove() | Function to remove the entity |
Model Functions
Method Name | Description |
---|---|
get_entity() |
Function to fetch the entity by the primary key. returns row_array() . entity will be replaced with the name of the table in singular form (or if it is overridden in the options page)For example, if the entity is product, the name of the function will be get_product()
|
get_all_entities() |
Function all the records of that entity. returns result_array() . entities in the function name will be replaced with the name of the table in plural form (or if it is overridden in the options page).For example, if the entity is product, the name of the function will be get_all_products()
|
add_entity($params) |
Function to add the entity. $params will take the post values passed from the controller.
entity will be replaced with the name of the table in singular form (or if it is overridden in the options page)For example, if the entity is product, the name of the function will be add_product()
|
delete_entity() |
Entity will be replaced with the name of the table in singular form (or if it is overridden in the options page) For example, if the entity is product, the name of the function will be delete_product()
|