Smart Object Management

The smart object management is a important part of the autoloader. Smart objects are extbase domain model that have a @db annotation. Models with this annotations are smart objects for different processes.

Database definition (general):

The database definition is created automatic via a install tool hook. The target object will be reflected and the database definition is generated by the autoloader extension on the fly. This is no performance bottleneck because the database definition is only called in the extension install process and in the install tool itself. This mechanism take care, that all “@db”-properties of “@db” models exists in the persistence layer. All properties that have no @db-annotation are already in the database or do not need a field in the database layer.

TCA file generation (TcaFiles loader):

The TCA files of the given smart objects are generated automatic via the TcaFiles loader and build a base TCA on the fly (the TCA ist cached by the core). You have to modify the generated TCA if you need special fields in the backend. FileReferences, int, boolean and normal text are in the right format. Especially relation between different objects arn’t in the automatic mapping of the properties.

Content Objects (ContentObjects loader):

Content objects are special domain model that are placed in the “Classes/Domain/Model/Content/” folder. All these models are registered as content elements. The content element is rendered by a generic Controller (you do not need a own controller) and load the Fluid Template from “Resources/Private/Templates/Content”. In the fluid template you should use {object} to get access to your domain model or use {data} to get access to the whole database record.