src/Sulu/Bundle/ContactBundle/Controller/AccountController.php
private function addLogos($accounts, $locale)
    {
        $ids = array_filter(array_column($accounts, 'logo'));
        $logos = $this->get('sulu_media.media_manager')->getFormatUrls($ids, $locale);
        foreach ($accounts as $key => $account) {
            if (array_key_exists('logo', $account) && $account['logo'] && array_key_exists($account['logo'], $logos)) {
                $accounts[$key]['logo'] = $logos[$account['logo']];
            }
        }

        return $accounts;
    }
private function addLogos($accounts, $locale)
    {
        $ids = array_filter(array_column($accounts, 'logo'));
        $logos = $this->get('sulu_media.media_manager')->getFormatUrls($ids, $locale);
        foreach ($accounts as $key => $account) {
            if (array_key_exists('logo', $account) && $account['logo'] && array_key_exists($account['logo'], $logos)) {
                $accounts[$key]['logo'] = $logos[$account['logo']];
            }
        }

        return $accounts;
    }
private function addLogos ( $ accounts , $ locale ) { $ ids = array_filter ( array_column ( $ accounts , 'logo' ) ) ; $ logos = $ this -> get ( 'sulu_media.media_manager' ) -> getFormatUrls ( $ ids , $ locale ) ; foreach ( $ accounts as $ key => $ account ) { if ( array_key_exists ( 'logo' , $ account ) && $ account [ 'logo' ] && array_key_exists ( $ account [ 'logo' ] , $ logos ) ) { $ accounts [ $ key ] [ 'logo' ] = $ logos [ $ account [ 'logo' ] ] ; } } return $ accounts ; }
Takes an array of accounts and resets the logo-property containing the media id with
the actual urls to the logo thumbnails.

@param array $accounts
@param string $locale

@return array
Takes an array of accounts and resets the logo - property containing the media id with the actual urls to the logo thumbnails .