Forum

Admin Core Functions

The controller has 12 functions:

  1. add() - Redirect to new form with id = 0 (&layout=edit&id=0)
  2. edit() - Redirect to editing for with id
  3. apply() - Save (create record) and redirect to edit form
  4. save() - Save (create record) and close (redirect to list view)
  5. save2new() - Save (create record) and redirect to add new form
  6. save2copy() - Save (create record) as copy of existing record. Modifies title and alias before saving.
  7. cancel()
  8. delete() - Delete multiple records
  9. pub() - Publish multiple records
  10. unpub() - Unpublish multiple records
  11. createRecord() - Create or modify record; Also validates data
  12. deleteTable() - Truncate table

Other functions to overwrite

  • pre_delete()
  • pre_save()
  • post_save()

The model has 8 functions:

  1. getForm() - Get form and load item, if any
  2. getItem() - Get item as object; Also converts JSON to objects
  3. save() - Save record in the database
  4. del() - Delete multiple records from database
  5. changeState() - Change state of multiple records in database
  6. getConfig() - Get configuration of particular type as array
  7. totalRows() - Returns total rows in table
  8. deleteTable() - Delete all records from table
  9. validate() - Validate form against data

save()

  1. Convert arrays to JSON
  2. Handling of Alias
  3. Handling of Ordering
  4. Handling of Created Date
  5. Handling of Modified Date

Login to reply