Beispiel #1
0
 function setUntranslated()
 {
     $aoContentFields = $this->getContentFieldsContainer()->getContentFields();
     foreach ($aoContentFields as $sFieldName => $oContentField) {
         if ($oContentField->isTranslatable()) {
             $asValues = array();
             if ($oContentField instanceof AnwStructuredContentField_composed) {
                 $aoSubContents = $this->getSubContents($sFieldName);
                 foreach ($aoSubContents as $i => $oSubContent) {
                     $oSubContent->setUntranslated();
                     //$asValues[] = AnwUtils::xmlDumpNodeChilds($oSubContent->toXml()->documentElement);
                 }
             } else {
                 $asValues = $this->getContentFieldValues($sFieldName);
                 foreach ($asValues as $i => $sValue) {
                     $oValueXml = AnwUtils::loadXML('<doc>' . $sValue . '</doc>');
                     $oValueXml = AnwXml::xmlAddTranslateTags($oValueXml);
                     //contentfield already checked
                     $asValues[$i] = AnwUtils::xmlDumpNodeChilds($oValueXml);
                 }
                 $this->setContentFieldValues($sFieldName, $asValues);
             }
         }
     }
 }