public function ManageExport::isReadyToImport in Content Export YAML 8
File
- src/
ManageExport.php, line 94
Class
Namespace
Drupal\content_export_yamlCode
public function isReadyToImport($file) {
if (file_exists($file)) {
try {
$content = file_get_contents($file, FILE_USE_INCLUDE_PATH);
$parsed = new Parser();
$object = $parsed
->parse($content, SymfonyYaml::PARSE_OBJECT);
if ($object) {
return true;
}
} catch (\Exception $e) {
\Drupal::logger('content_export_yaml')
->error('File yaml has error :' . $e);
}
}
return false;
}