Its part 5.4.1 and 5.4.2 which go into detail about the ComplexTableField. When you are then returning a function with i believe it was:
function getCMSFields()
{
$fields = parent::getCMSFields();
$jobsTable = new ComplexTableField(
$this,
'Jobs',
'Job'
);
$fields->addFieldToTab('Root.Jobs', $jobsTable);
return $fields;
}
Or it was:
function getCMSFields()
{
$fields = new FieldList(
new TextField('Title', 'Job Title'),
new TextAreaField('Description', 'Job Description'),
new TextField('Location', 'Location'),
new DateField('ExpiryDate', 'Expiry Date')
);
return $fields;
}
Though i have change new FieldSet to new FieldList (to be inline with the documentations).
And i was using silverstripe 3.0.5
Posted to: ComplexTableField.php (line 596) | Show Thread | Post Reply