You are here

public function FormatConverter::html_to_standard in Lingotek Translation 8

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

Parameters

object $source_doc source document:

string $content HTML 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 219

Class

FormatConverter

Namespace

Drupal\lingotek\Form

Code

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