function FormatInterface::validateImport in Translation Management Tool 8
Validates that the given file is valid and can be imported.
Parameters
$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
Job Returns the corresponding translation job entity if the import file is valid, FALSE otherwise.
2 methods override FormatInterface::validateImport()
- Html::validateImport in translators/
tmgmt_file/ src/ Plugin/ tmgmt_file/ Format/ Html.php - Validates that the given file is valid and can be imported.
- Xliff::validateImport in translators/
tmgmt_file/ src/ Plugin/ tmgmt_file/ Format/ Xliff.php - Validates that the given file is valid and can be imported.
File
- translators/
tmgmt_file/ src/ Format/ FormatInterface.php, line 38
Class
- FormatInterface
- Interface for exporting to a given file format.
Namespace
Drupal\tmgmt_file\FormatCode
function validateImport($imported_file, $is_file = TRUE);