function ExportResult::__toString
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/DefaultContent/ExportResult.php \Drupal\Core\DefaultContent\ExportResult::__toString()
Returns the exported entity data as YAML.
Return value
string The exported entity data in YAML format.
File
-
core/
lib/ Drupal/ Core/ DefaultContent/ ExportResult.php, line 28
Class
- ExportResult
- The result of exporting a content entity.
Namespace
Drupal\Core\DefaultContentCode
public function __toString() : string {
$data = [
'_meta' => $this->metadata
->get(),
] + $this->data;
return Yaml::encode($data);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.