src/Form/Hydrator/TreeHydrator.php
private function prepareHydrateData(array $data)
    {
        /*
         * unflatten tree
         */
        $items = $data['items'];
        $tree = [ '__root__' => array_shift($items) ];

        foreach ($items as $item) {
            $parent = substr($item['current'], 0, strrpos($item['current'], '-'));
            $tree[$parent][] = $item;
        }

        $this->hydrateData = $tree;
    }
private function prepareHydrateData(array $data)
    {
        /*
         * unflatten tree
         */
        $items = $data['items'];
        $tree = [ '__root__' => array_shift($items) ];

        foreach ($items as $item) {
            $parent = substr($item['current'], 0, strrpos($item['current'], '-'));
            $tree[$parent][] = $item;
        }

        $this->hydrateData = $tree;
    }
Prepares the form values for hydrating.

@internal
Populates the {@link hydrateData} array

@param array $data