Skip to content

Commit

Permalink
crutched yaml rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Jun 27, 2015
1 parent 055defb commit e731acd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion handlers/YamlHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace hidev\handlers;

use Symfony\Component\Yaml\Yaml;
use yii\helpers\ArrayHelper;

/**
* Handler for YAML files.
Expand All @@ -23,7 +24,8 @@ class YamlHandler extends TypeHandler
*/
public function renderType($data)
{
return Yaml::dump($data);
/// XXX TODO fix getItems crutch
return Yaml::dump(ArrayHelper::toArray($data->getItems()), 4);
}

/**
Expand Down

0 comments on commit e731acd

Please sign in to comment.