src/Sulu/Bundle/ContactBundle/Contact/AccountManager.php
protected function getApiObject($account, $locale)
    {
        $apiObject = $this->accountFactory->createApiEntity($account, $locale);
        if ($account->getLogo()) {
            $apiLogo = $this->mediaManager->getById($account->getLogo()->getId(), $locale);
            $apiObject->setLogo($apiLogo);
        }

        return $apiObject;
    }
protected function getApiObject($account, $locale)
    {
        $apiObject = $this->accountFactory->createApiEntity($account, $locale);
        if ($account->getLogo()) {
            $apiLogo = $this->mediaManager->getById($account->getLogo()->getId(), $locale);
            $apiObject->setLogo($apiLogo);
        }

        return $apiObject;
    }
protected function getApiObject ( $ account , $ locale ) { $ apiObject = $ this -> accountFactory -> createApiEntity ( $ account , $ locale ) ; if ( $ account -> getLogo ( ) ) { $ apiLogo = $ this -> mediaManager -> getById ( $ account -> getLogo ( ) -> getId ( ) , $ locale ) ; $ apiObject -> setLogo ( $ apiLogo ) ; } return $ apiObject ; }
Takes a account entity and a locale and returns the api object.

@param Account $account
@param string $locale

@return AccountApi
Takes a account entity and a locale and returns the api object .