public function renderArray(AccountInterface $account)
    {
        $array = array(
            'name' => $account->getName(),
        );

        foreach ($account->getChildren() as $child) {
            $array['children'][] = $this->renderArray($child);
        }

        return $array;
    }