API:Models and Tables

From CollectiveAccess Documentation
Jump to: navigation, search

Icons-flag-fr.png API:Models_and_Tables_FR

Each table in the CollectiveAccess database that you might need to access has a corresponding model class. Model classes provide functionality that eases reading, editing and writing data to its table including:

  1. Insert, update and delete functions (you don't need to, and should not, write SQL for these operations)
  2. Navigating of hierarchies for tables supporting hierarchices tables
  3. Support for extended data types, including date ranges, georeferences, uploaded media, timecode and more
  4. Support for user defined, repeating fields
  5. Support for retrieving data from rows in related tables (many-one and many-to-many)
  6. Support for fields restricted to lists defined in the list/vocabulary manager
  7. Generation of HTML form element widgets for specific fields

MORE TO COME


Model classes

Models are located in app/models

MORE TO COME

Model inheritance

All models inherit from BaseModel (located in app/lib/core/BaseModel.php), which provides a baseline of functionality. Some models may inherit from sub-classes of BaseModel that layer on additional functionality. These include:

  1. BaseModelWithAttributes
  2. LabelableBaseModelWithAttributes
  3. BundlableLabelableBaseModelWithAttributes
  4. BaseRelationshipModel


MORE TO COME

sphinx

Namespaces

Variants
Actions
Navigation
Tools
User
Personal tools