protected function Exporter::putFile in Default Content for D8 8
Helper for ::writeDefaultContent to wrap file_put_contents.
Parameters
string $path: Content directory + entity directory to which to write the file.
string $uuid: Entity UUID, to be used as filename.
string $serialized_entity: The serialized entity to write.
1 call to Exporter::putFile()
- Exporter::writeDefaultContent in src/
Exporter.php - Writes an array of serialized entities to a given folder.
File
- src/
Exporter.php, line 258
Class
- Exporter
- A service for handling import of default content.
Namespace
Drupal\default_contentCode
protected function putFile($path, $uuid, $serialized_entity) {
file_put_contents($path . '/' . $uuid . '.json', $serialized_entity);
}