You are here

protected function ConfigurationHandler::exportToJson in Configuration Management 7.3

1 call to ConfigurationHandler::exportToJson()
ConfigurationHandler::export in src/Handlers/ConfigurationHandler.php
Generates the JSON representation of this configuration.

File

src/Handlers/ConfigurationHandler.php, line 80

Class

ConfigurationHandler

Namespace

Configuration\Handlers

Code

protected function exportToJson(Configuration $configuration) {
  $object = $configuration
    ->toObject();
  $jsonPretty = new JsonPretty();
  return $jsonPretty
    ->prettify($object, NULL, '  ');
}