mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 09:05:59 +00:00
Make documentation more clear.
This commit is contained in:
parent
7cdcab00c9
commit
0702e8902b
@ -210,10 +210,23 @@ attach this behaviour to custom fields by calling a helper function from your ge
|
|||||||
|
|
||||||
// Add fields as usual
|
// Add fields as usual
|
||||||
$additionalField = new TextField('AdditionalProperty');
|
$additionalField = new TextField('AdditionalProperty');
|
||||||
$fields->addFieldToTab('Root.Content.Main', $additionalField);
|
$fields->addFieldToTab('Root.Main', $additionalField);
|
||||||
|
|
||||||
// Apply Translatable modifications
|
// Apply Translatable modifications
|
||||||
$this->applyTranslatableFieldsUpdate($fields, str_replace('get', 'update', __FUNCTION__));
|
$this->applyTranslatableFieldsUpdate($fields, 'updateCMSFields');
|
||||||
|
|
||||||
|
return $fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSettingsFields() {
|
||||||
|
$fields = parent::getSettingsFields();
|
||||||
|
|
||||||
|
// Add fields as usual
|
||||||
|
$additionalField = new TextField('AdditionalProperty');
|
||||||
|
$fields->addFieldToTab('Root.Main', $additionalField);
|
||||||
|
|
||||||
|
// Apply Translatable modifications
|
||||||
|
$this->applyTranslatableFieldsUpdate($fields, 'updateSettingsFields');
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user