Skip to content
Snippets Groups Projects
Commit 2df45fb3 authored by rishabh vishwakarma's avatar rishabh vishwakarma Committed by Ivan Trokhanenko
Browse files

Issue #3332262 by Rishabh Vishwakarma: Drupal 10 compatibility

parent aa5c9187
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ name: Node Export
type: module
description: 'Allows users to export content and then import into another Drupal installation.'
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: ^8 || ^9 || ^10
configure: node_export.config
dependencies:
- drupal:action
......@@ -4,6 +4,7 @@ namespace Drupal\node_export;
use Drupal\node\Entity\Node;
use Drupal\Core\File\FileSystemInterface;
use Drupal\file\FileRepository;
/**
* Provides a Node Export function.
......@@ -77,7 +78,7 @@ class NodeExport {
// TODO: Implement XML.
break;
}
return $save ? file_save_data($data, NodeExport::getFileUri($format), FileSystemInterface::EXISTS_REPLACE) : $data;
return $save ? \Drupal::service('file.repository')->writeData($data, NodeExport::getFileUri($format), FileSystemInterface::EXISTS_REPLACE) : $data;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment