private function resolveLinksForResourceType(string $type, array $links, string $locale = null): array
    {
        $resourceIds = \array_map(function (Link $link): string {
            return $link->getId();
        }, \array_filter($links, function (Link $link) use ($type): bool {
            return $link->getLinkType() === $type;
        }));

        $resources = [];
        $collection = $this->fetchResourcesForGivenIds($resourceIds, $type, $locale);
        foreach ($collection as $resource) {
            $resources[$type.'.'.$resource->getId()] = $resource;
        }

        return $resources;
    }