public function getMedia()
    {
        if ($this->media === null) {
            $cache = $this->getMediaCache();

            // Use cached media if possible.
            $cacheKey = md5('media' . $this->getCacheKey());
            if (!$media = $cache->get($cacheKey)) {
                $media = new Media($this->getMediaFolder(), $this->getMediaOrder());
                $cache->set($cacheKey, $media);
            }
            $this->media = $media;
        }

        return $this->media;
    }
public function getMedia()
    {
        if ($this->media === null) {
            $cache = $this->getMediaCache();

            // Use cached media if possible.
            $cacheKey = md5('media' . $this->getCacheKey());
            if (!$media = $cache->get($cacheKey)) {
                $media = new Media($this->getMediaFolder(), $this->getMediaOrder());
                $cache->set($cacheKey, $media);
            }
            $this->media = $media;
        }

        return $this->media;
    }
public function getMedia ( ) { if ( $ this -> media === null ) { $ cache = $ this -> getMediaCache ( ) ; // Use cached media if possible. $ cacheKey = md5 ( 'media' . $ this -> getCacheKey ( ) ) ; if ( ! $ media = $ cache -> get ( $ cacheKey ) ) { $ media = new Media ( $ this -> getMediaFolder ( ) , $ this -> getMediaOrder ( ) ) ; $ cache -> set ( $ cacheKey , $ media ) ; } $ this -> media = $ media ; } return $ this -> media ; }
Gets the associated media collection.

@return MediaCollectionInterface  Representation of associated media.
Gets the associated media collection .