Development Manual: Initialization


  1. Actions
  2. Foreign keys: fks
  3. Query Names and Pagination
  4. Model Variables
  5. Triggers: nextpages


Each component has a configuration file, component.json, to define the initial parameters for the Model and Filter classes. It is located in the same directory as the class files.

This is an example:

  "actions" : {
    "topics"  :{"groups": ["public"]},
    "startnew":{"options":["no_method", "no_db"]},
    "insert"  :{"validate":["question_id","choice_text","votes"]},
    "delete"  :{"validate":["id"]},
    "edit"    :{"validate":["id"]},
    "update"  :{"groups":["public"],"validate":["id"]}
  "current_key"  :"id",
  "insert_pars"  :["question_id","choice_text","votes"],
  "update_pars"  :["question_id","choice_text","votes","id"],
  "topics_pars"  :["question_id","choice_text","votes","id"],
  "edit_pars"    :["question_id","choice_text","votes","id"],
  "current_id_auto" :"id"

The actions and fks blocks are used for Filter,  and the rest blocks for Model.