src/Sulu/Bundle/MediaBundle/Api/Media.php
private function getLocalizedMeta()
    {
        if ($this->localizedMeta) {
            return $this->localizedMeta;
        }

        $metas = $this->getFileVersion()->getMeta();
        $this->localizedMeta = $metas[0];

        foreach ($metas as $key => $meta) {
            if ($meta->getLocale() == $this->locale) {
                $this->localizedMeta = $meta;
                break;
            }
        }

        return $this->localizedMeta;
    }
private function getLocalizedMeta()
    {
        if ($this->localizedMeta) {
            return $this->localizedMeta;
        }

        $metas = $this->getFileVersion()->getMeta();
        $this->localizedMeta = $metas[0];

        foreach ($metas as $key => $meta) {
            if ($meta->getLocale() == $this->locale) {
                $this->localizedMeta = $meta;
                break;
            }
        }

        return $this->localizedMeta;
    }
private function getLocalizedMeta ( ) { if ( $ this -> localizedMeta ) { return $ this -> localizedMeta ; } $ metas = $ this -> getFileVersion ( ) -> getMeta ( ) ; $ this -> localizedMeta = $ metas [ 0 ] ; foreach ( $ metas as $ key => $ meta ) { if ( $ meta -> getLocale ( ) == $ this -> locale ) { $ this -> localizedMeta = $ meta ; break ; } } return $ this -> localizedMeta ; }
Searches the meta for the file version in the media locale. Might also return a fallback.

@return FileVersionMeta

@throws FileVersionNotFoundException
Searches the meta for the file version in the media locale . Might also return a fallback .