public function getMedia()
    {
        // if media was set by setMedia() use this->media
        if ($this->media) {
            return $this->media;
        }
        $mediaCollection = [];
        $media = $this->entity->getMedia();
        if (!$media) {
            return $mediaCollection;
        }
        foreach ($media as $medium) {
            $mediaCollection[] = new Media($medium, $this->locale);
        }

        return $mediaCollection;
    }