How can I use HasManyComplexTableField with a Custom Site Config?
My code returns an error: "Can't figure out the data class of"
<?php
class CustomSiteConfig extends Extension {
function extraStatics() {
return array(
'db' => array(
'Link' => 'Text',
'Text' => 'Text'
),
'has_many' => array(
'Links' => 'Link'
),
);
}
public function updateCMSFields(FieldSet $fields) {
$tablefield = new HasManyComplexTableField (
$this,
'Links',
'Link',
array(
'Link' => 'Link',
'Text' => 'Link Text'
),
'getCMSFields_forPopup'
);
$fields->addFieldToTab( 'Root.Content.Links', $tablefield );
return $fields;
}
}
?>