Difference between revisions of "Models"

From Joomla! Documentation

(Created page with "{{underconstruction}} {{version/tutor|4.x}} == Introduction == <!--T:1--> The models encapsulate the data used by the component. In most cases this data will come from a data...")
 
 
Line 19: Line 19:
 
=== AdminModel ===
 
=== AdminModel ===
  
== Events and Hooks ==  
+
== Events ==  
=== onContentNormaliseRequestData ===
+
=== onUserBeforeDataValidation ===
=== postSaveHook ===
+
=== onContentBeforeValidateData ===
 +
=== onContentCleanCache ===
 +
=== onTableSetNewTags ===
 +
=== event_before_delete ===
 +
=== event_after_delete ===
 +
=== event_change_state ===
 +
=== event_before_change_state ===
 +
=== event_before_save ===
 +
=== event_after_save ===
  
 
<noinclude>
 
<noinclude>

Latest revision as of 05:57, 5 January 2021

Documentation all together tranparent small.png
Under Construction

This article or section is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well. If this article or section has not been edited in several days, please remove this template.
This article was last edited by Thelordofweb (talk| contribs) 3 years ago. (Purge)


Introduction[edit]

The models encapsulate the data used by the component. In most cases this data will come from a database, either the Joomla database, or some external database, but it is also possible for the models to obtain data from other sources, such as via a web services API running on another server. The models is also responsible for updating the database where appropriate. The purpose of the models is to isolate the controller and view from the details of how data is obtained or amended.

Model Classes[edit]

BaseModel[edit]

BaseDatabaseModel[edit]

ItemModel[edit]

ListModel[edit]

FormModel[edit]

AdminModel[edit]

Events[edit]

onUserBeforeDataValidation[edit]

onContentBeforeValidateData[edit]

onContentCleanCache[edit]

onTableSetNewTags[edit]

event_before_delete[edit]

event_after_delete[edit]

event_change_state[edit]

event_before_change_state[edit]

event_before_save[edit]

event_after_save[edit]