function 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.