Exemplo n.º 1
0
function addDefinedMeaningAlternativeDefinition( $definedMeaningId, $languageId, $text, $sourceMeaningId ) {
	$translatedContentId = newTranslatedContentId();
	
	createDefinedMeaningAlternativeDefinition( $definedMeaningId, $translatedContentId, $sourceMeaningId );
	addTranslatedText( $translatedContentId, $languageId, $text );
}
function rollBackAlternativeDefinition( $rollBackAction, $definedMeaningId, $translatedContentId, $sourceId, $operation ) {
	if ( shouldRemove( $rollBackAction, $operation ) ) {
		removeDefinedMeaningAlternativeDefinition( $definedMeaningId, $translatedContentId );
	}
	elseif ( shouldRestore( $rollBackAction, $operation ) ) {
		createDefinedMeaningAlternativeDefinition( $definedMeaningId, $translatedContentId, $sourceId );
	}
}