Skip to content

Adding a basic Content Type

dpawatts edited this page Aug 26, 2014 · 8 revisions

First create the model in

/fuel/app/classes/model

The class definition can extend a bunch of base classes located here:

/fuel/packages/cmf/classes/CMF/Model/

All must derive from this if you don't want to extend one of the other types

/fuel/packages/cmf/classes/CMF/Model/Base

e.g.

class Model_MyNewClass extends Page {

You can then add your custom property fields...

/**
* @ORM\Column(type="integer")
*/
protected $price;

The comments above the property are important as they define what the property is in the database. More information can be found here and more examples here

Clone this wiki locally