function ContentExport::importEntity in Content Export YAML 8
Convert YAML to OBJECT
1 call to ContentExport::importEntity()
File
- src/
ContentExport.php, line 200
Class
- ContentExport
- Created by PhpStorm. User: USER Date: 11/13/18 Time: 2:04 PM
Namespace
Drupal\content_export_yamlCode
function importEntity($yaml_object, $entity) {
$parsed = new Parser();
$object = $parsed
->parse($yaml_object, SymfonyYaml::PARSE_OBJECT);
if (is_object($object)) {
return $this
->savingEntity($object, $entity);
}
else {
$this->logger
->error('Failed to save item');
}
return FALSE;
}