You are here

public function FormatConverter::plaintext_to_standard in Lingotek Translation 8

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

Parameters

object $source_doc source document:

string $content PLAINTEXT 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 206

Class

FormatConverter

Namespace

Drupal\lingotek\Form

Code

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