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

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

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

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

        return $array;
    }
public function renderArray ( AccountInterface $ account ) { $ array = array ( 'name' => $ account -> getName ( ) , ) ; foreach ( $ account -> getChildren ( ) as $ child ) { $ array [ 'children' ] [ ] = $ this -> renderArray ( $ child ) ; } return $ array ; }
Render Account tree as a multi-level array

@author Tom Haskins-Vaughan <tom@tomhv.uk>
@since  0.8.0

@param  AccountInterface $account

@return array
Render Account tree as a multi - level array