protected function normalizeTranslations(Model\TranslatableInterface $translatable, $format, array $context = [])
    {
        $data = [];

        $groups = isset($context['groups']) ? (array)$context['groups'] : [];

        /*if (in_array('Default', $groups)) {
            if ($translatable instanceof Model\TranslatableInterface) {
                $data['translations'] = array_map(function (Model\TranslationInterface $t) use ($format, $context) {
                    return $t->getId();
                }, $translatable->getTranslations()->toArray());
            }
        }*/
        if (in_array('Search', $groups)) {
            if ($translatable instanceof Model\TranslatableInterface) {
                $data['translations'] = array_map(function (Model\TranslationInterface $t) use ($format, $context) {
                    return $this->normalizeObject($t, $format, $context);
                }, $translatable->getTranslations()->toArray());
            }
        }

        return $data;
    }
protected function normalizeTranslations(Model\TranslatableInterface $translatable, $format, array $context = [])
    {
        $data = [];

        $groups = isset($context['groups']) ? (array)$context['groups'] : [];

        /*if (in_array('Default', $groups)) {
            if ($translatable instanceof Model\TranslatableInterface) {
                $data['translations'] = array_map(function (Model\TranslationInterface $t) use ($format, $context) {
                    return $t->getId();
                }, $translatable->getTranslations()->toArray());
            }
        }*/
        if (in_array('Search', $groups)) {
            if ($translatable instanceof Model\TranslatableInterface) {
                $data['translations'] = array_map(function (Model\TranslationInterface $t) use ($format, $context) {
                    return $this->normalizeObject($t, $format, $context);
                }, $translatable->getTranslations()->toArray());
            }
        }

        return $data;
    }
protected function normalizeTranslations ( Model \ TranslatableInterface $ translatable , $ format , array $ context = [ ] ) { $ data = [ ] ; $ groups = isset ( $ context [ 'groups' ] ) ? ( array ) $ context [ 'groups' ] : [ ] ; /*if (in_array('Default', $groups)) {
            if ($translatable instanceof Model\TranslatableInterface) {
                $data['translations'] = array_map(function (Model\TranslationInterface $t) use ($format, $context) {
                    return $t->getId();
                }, $translatable->getTranslations()->toArray());
            }
        }*/ if ( in_array ( 'Search' , $ groups ) ) { if ( $ translatable instanceof Model \ TranslatableInterface ) { $ data [ 'translations' ] = array_map ( function ( Model \ TranslationInterface $ t ) use ( $ format , $ context ) { return $ this -> normalizeObject ( $ t , $ format , $ context ) ; } , $ translatable -> getTranslations ( ) -> toArray ( ) ) ; } } return $ data ; }
Normalizes the translatable's translations.

@param Model\TranslatableInterface $translatable
@param string                      $format
@param array                       $context

@return array
Normalizes the translatable s translations .