You are here

public function FormatConverter::txt_to_standard in Lingotek Translation 8

Converts source TXT into a StandardImportObject that can be imported into WP @author Unkown

Parameters

object $source_doc source document:

string $content TXT string that is then parsed to get the relevant: information for the title and body

Return value

StandardImportObject That can be imported into WP

File

src/Form/FormatConverter.php, line 193

Class

FormatConverter

Namespace

Drupal\lingotek\Form

Code

public function txt_to_standard($doc, $content) {
  $title = $doc->properties->title;
  return new StandardImportObject($title, $content);
}