mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
Added a callback hook "onTranslatableCreate" that can be used to create translations of dependent objects
This commit is contained in:
parent
084b22a414
commit
061057ca04
@ -1323,6 +1323,9 @@ class Translatable extends DataExtension implements PermissionProvider {
|
||||
$newTranslation->_TranslationGroupID = $translationGroupID ? $translationGroupID : $this->owner->ID;
|
||||
if($saveTranslation) $newTranslation->write();
|
||||
|
||||
// run callback on page for translation related hooks
|
||||
$newTranslation->invokeWithExtensions('onTranslatableCreate', $saveTranslation);
|
||||
|
||||
return $newTranslation;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user