Skip to content

Instantly share code, notes, and snippets.

@pniederlag
Created February 5, 2011 14:57
Show Gist options
  • Save pniederlag/812499 to your computer and use it in GitHub Desktop.
Save pniederlag/812499 to your computer and use it in GitHub Desktop.
mappings and subclasses for extbase
config.tx_extbase {
persistence{
classes {
Tx_Foo_Domain_Model_ContentElement {
# define the subclasses
subclasses {
Tx_Foo_Domain_Model_Ce1 = Tx_Foo_Domain_Model_Ce1
Tx_Foo_Domain_Model_Ce2 = Tx_Foo_Domain_Model_Ce2
}
mapping {
tableName = tt_content
}
}
Tx_Foo_Domain_Model_Ce1 {
mapping {
# 'recordType' needs to match the value from "CType" column
recordType = foo_ce1
tableName = tt_content
columns {
// we either need to adapt our properties in the model to headerLayout and colpos
// or add an explicit mapping to use the regular column names
// since we use standard ts for rendering of the header, we need the properties as they are acessed in TS (header_layout)
header_layout.mapOnProperty = header_layout
colPos.mapOnProperty = colPos
}
}
}
Tx_Foo_Domain_Model_Ce2 {
mapping {
# 'recordType' needs to match the value from "CType" column
recordType = foo_ce2
tableName = tt_content
// recordType = text
columns {
// we either need to adapt our properties in the model to headerLayout and colpos
// or add an explicit mapping to use the regular column names
// since we use standard ts for rendering of the header, we need the properties as they are acessed in TS (header_layout)
header_layout.mapOnProperty = header_layout
colPos.mapOnProperty = colPos
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment