/**
  * Gets all configuration data of the specified section
  *
  * @param string $path The path to API section. For example: look-and-feel/grid
  *
  * @return array
  */
 public function getData($path)
 {
     $variables = $this->configProvider->getApiTree($path)->getVariables(true);
     $result = [];
     foreach ($variables as $variable) {
         $var = $variable->toArray();
         $var['value'] = $this->configManager->get($variable->getKey());
         $var = array_merge($var, $this->configManager->getInfo($variable->getKey()));
         $result[] = $var;
     }
     return $result;
 }
 /**
  * Gets all configuration data of the specified section
  *
  * @param string $path The path to API section. For example: look-and-feel/grid
  * @param string $scope The configuration scope
  *
  * @return array
  */
 public function getData($path, $scope = 'user')
 {
     /** @var ConfigManager $configManager */
     $configManager = $this->configManagers[$scope];
     $variables = $this->configProvider->getApiTree($path)->getVariables(true);
     $result = [];
     foreach ($variables as $variable) {
         $value = $configManager->get($variable->getKey());
         $dataTransformer = $this->configProvider->getDataTransformer($variable->getKey());
         if ($dataTransformer !== null) {
             $value = $dataTransformer->transform($value);
         }
         $var = $variable->toArray();
         $var['value'] = $this->getTypedValue($variable->getType(), $value);
         $var = array_merge($var, $configManager->getInfo($variable->getKey()));
         $result[] = $var;
     }
     return $result;
 }