public function getDataFor($arrIds)
    {
        $activeLanguage   = $this->getMetaModel()->getActiveLanguage();
        $fallbackLanguage = $this->getMetaModel()->getFallbackLanguage();

        $return   = $this->getTranslatedDataFor($arrIds, $activeLanguage);
        $tagCount = $this->getTagCount($arrIds);

        // Check if we got all tags.
        foreach ($return as $key => $results) {
            // Remove matching tags.
            if (\count($results) === $tagCount[$key]) {
                unset($tagCount[$key]);
            }
        }

        $arrFallbackIds = \array_keys($tagCount);

        // Second round, fetch fallback languages if not all items could be resolved.
        if (($activeLanguage !== $fallbackLanguage) && (\count($arrFallbackIds) > 0)) {
            // Cannot use array_merge here as it would renumber the keys.
            foreach ($this->getTranslatedDataFor($arrFallbackIds, $fallbackLanguage) as $id => $transValue) {
                foreach ((array) $transValue as $transId => $value) {
                    if (!$return[$id][$transId]) {
                        $return[$id][$transId] = $value;
                    }
                }
            }
        }

        return $return;
    }
public function getDataFor($arrIds)
    {
        $activeLanguage   = $this->getMetaModel()->getActiveLanguage();
        $fallbackLanguage = $this->getMetaModel()->getFallbackLanguage();

        $return   = $this->getTranslatedDataFor($arrIds, $activeLanguage);
        $tagCount = $this->getTagCount($arrIds);

        // Check if we got all tags.
        foreach ($return as $key => $results) {
            // Remove matching tags.
            if (\count($results) === $tagCount[$key]) {
                unset($tagCount[$key]);
            }
        }

        $arrFallbackIds = \array_keys($tagCount);

        // Second round, fetch fallback languages if not all items could be resolved.
        if (($activeLanguage !== $fallbackLanguage) && (\count($arrFallbackIds) > 0)) {
            // Cannot use array_merge here as it would renumber the keys.
            foreach ($this->getTranslatedDataFor($arrFallbackIds, $fallbackLanguage) as $id => $transValue) {
                foreach ((array) $transValue as $transId => $value) {
                    if (!$return[$id][$transId]) {
                        $return[$id][$transId] = $value;
                    }
                }
            }
        }

        return $return;
    }
{@inheritDoc}