Util/DataGrid/DataGridFormatter.php
protected function toArray(TransUnitInterface $transUnit)
    {
        $data = array(
            'id'           => $transUnit->getId(),
            'domain'       => $transUnit->getDomain(),
            'key'          => $transUnit->getKey(),
            'translations' => array(),
        );

        foreach ($transUnit->getTranslations() as $translation) {
            $data['translations'][] = array(
                'locale'  => $translation->getLocale(),
                'content' => $translation->getContent(),
            );
        }

        return $data;
    }
protected function toArray(TransUnitInterface $transUnit)
    {
        $data = array(
            'id'           => $transUnit->getId(),
            'domain'       => $transUnit->getDomain(),
            'key'          => $transUnit->getKey(),
            'translations' => array(),
        );

        foreach ($transUnit->getTranslations() as $translation) {
            $data['translations'][] = array(
                'locale'  => $translation->getLocale(),
                'content' => $translation->getContent(),
            );
        }

        return $data;
    }
protected function toArray ( TransUnitInterface $ transUnit ) { $ data = array ( 'id' => $ transUnit -> getId ( ) , 'domain' => $ transUnit -> getDomain ( ) , 'key' => $ transUnit -> getKey ( ) , 'translations' => array ( ) , ) ; foreach ( $ transUnit -> getTranslations ( ) as $ translation ) { $ data [ 'translations' ] [ ] = array ( 'locale' => $ translation -> getLocale ( ) , 'content' => $ translation -> getContent ( ) , ) ; } return $ data ; }
Convert a trans unit into an array.

@param TransUnitInterface $transUnit
@return array
Convert a trans unit into an array .