Created
June 23, 2015 21:52
-
-
Save bueckl/db41a070dc2404403688 to your computer and use it in GitHub Desktop.
#SS3 adding original Content below formfields on Translated DOs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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