You are here

public function TMGMTFileFormatInterface::validateImport in Translation Management Tool 7

Validates that the given file is valid and can be imported.

@todo this function should NOT return a job. We need a import processor instance instead to deal with the import context.

Parameters

string $imported_file: File path to the file to be imported.

bool $is_file: (optional) Whether $imported_file is the path to a file or not.

Return value

TMGMTJob Returns the corresponding translation job entity if the import file is valid, FALSE otherwise.

2 methods override TMGMTFileFormatInterface::validateImport()
TMGMTFileFormatHTML::validateImport in translators/file/tmgmt_file.format.html.inc
Validates that the given file is valid and can be imported.
TMGMTFileformatXLIFF::validateImport in translators/file/tmgmt_file.format.xliff.inc
Validates that the given file is valid and can be imported.

File

translators/file/tmgmt_file.format.interface.inc, line 36

Class

TMGMTFileFormatInterface
Interface for exporting to a given file format.

Code

public function validateImport($imported_file, $is_file = TRUE);