Propel/TransUnitRepository.php
protected function filterTransUnitData($unitsData)
    {
        $cleaned = array();

        foreach ($unitsData as $unit) {
            /* @var $unit TransUnit */
            $transUnit = array(
                'id'           => $unit['Id'],
                'key'          => $unit['Key'],
                'domain'       => $unit['Domain'],
                'translations' => array(),
            );

            foreach ($unit['Translations'] as $translation) {
                $transUnit['translations'][] = array(
                    'locale'  => $translation['Locale'],
                    'content' => $translation['Content'],
                );
            }

            $cleaned[] = $transUnit;
        }

        return $cleaned;
    }
protected function filterTransUnitData($unitsData)
    {
        $cleaned = array();

        foreach ($unitsData as $unit) {
            /* @var $unit TransUnit */
            $transUnit = array(
                'id'           => $unit['Id'],
                'key'          => $unit['Key'],
                'domain'       => $unit['Domain'],
                'translations' => array(),
            );

            foreach ($unit['Translations'] as $translation) {
                $transUnit['translations'][] = array(
                    'locale'  => $translation['Locale'],
                    'content' => $translation['Content'],
                );
            }

            $cleaned[] = $transUnit;
        }

        return $cleaned;
    }
protected function filterTransUnitData ( $ unitsData ) { $ cleaned = array ( ) ; foreach ( $ unitsData as $ unit ) { /* @var $unit TransUnit */ $ transUnit = array ( 'id' => $ unit [ 'Id' ] , 'key' => $ unit [ 'Key' ] , 'domain' => $ unit [ 'Domain' ] , 'translations' => array ( ) , ) ; foreach ( $ unit [ 'Translations' ] as $ translation ) { $ transUnit [ 'translations' ] [ ] = array ( 'locale' => $ translation [ 'Locale' ] , 'content' => $ translation [ 'Content' ] , ) ; } $ cleaned [ ] = $ transUnit ; } return $ cleaned ; }
Convert transUnit data with nested translations into the required format.

@param array|PropelArrayCollection $transUnitData
@return array
Convert transUnit data with nested translations into the required format .