Internals / The 'Model'
Note: You are currently reading the documentation for Bolt 3.6. Looking for the documentation for Bolt 4.0 instead?
The way Bolt handles its ContentTypes is defined in the
which in turn determines the data-structure of the website.
Basically, whatever is defined in the ContentType gets added as columns to the
database that's configured in
Whenever the 'dashboard' is displayed, Bolt checks if the definitions in
contenttypes.yml matches the database columns, and if it doesn't it urges
the user to go to the 'repair database' screen.
Even though Bolt strives to be as simple as possible, it makes sense to think of Bolt as an MVC application. Silex provides the Controller part, the Twig templates are the View and the ContentTypes define the Model part.
All access to the content and the ContentTypes is done through the Storage class.
Records of content have a Content class. Browse the files
src/Content.php for details.