Sulu\Bundle\CategoryBundle\Api\Category::getMedias PHP Method

getMedias() public method

Returns the medias of the Category dependent on the locale.
public getMedias ( ) : Media[]
return Sulu\Bundle\MediaBundle\Api\Media[]
    public function getMedias()
    {
        if (($translation = $this->getTranslation(true)) === null) {
            return [];
        }
        $medias = [];
        foreach ($translation->getMedias() as $media) {
            $medias[] = new Media($media, $this->locale);
        }
        return $medias;
    }