Skip to content

Instantly share code, notes, and snippets.

@bueckl
Created June 23, 2015 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bueckl/db41a070dc2404403688 to your computer and use it in GitHub Desktop.
Save bueckl/db41a070dc2404403688 to your computer and use it in GitHub Desktop.
#SS3 adding original Content below formfields on Translated DOs
$ContentFutter1 = new HTMLEditorField('ContentFutter1', 'Spalte 1');
$ContentFutter2 = new HTMLEditorField('ContentFutter2', 'Spalte 2');
$ContentFutter3 = new HTMLEditorField('ContentFutter3', 'Spalte 3');
// transform the fields if we're not in the default locale
if(Translatable::default_locale() != Translatable::get_current_locale()) {
$translation = $this->getTranslation(Translatable::default_locale());
$transformation = new Translatable_Transformation($translation);
$ContentFutter1 = $transformation->transformFormField($ContentFutter1);
$ContentFutter2 = $transformation->transformFormField($ContentFutter2);
$ContentFutter3 = $transformation->transformFormField($ContentFutter3);
}
$fields->addFieldsToTab('Root.ContentFutter', array(
$ContentFutter1,
$ContentFutter2,
$ContentFutter3
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment