src/Sulu/Bundle/ContactBundle/Contact/AccountManager.php
public function getByIdAndInclude($id, $locale, $includes)
    {
        $account = $this->accountRepository->findAccountById($id, in_array('contacts', $includes));

        if (!$account) {
            throw new EntityNotFoundException($this->accountRepository->getClassName(), $id);
        }

        return $this->getApiObject($account, $locale);
    }
public function getByIdAndInclude($id, $locale, $includes)
    {
        $account = $this->accountRepository->findAccountById($id, in_array('contacts', $includes));

        if (!$account) {
            throw new EntityNotFoundException($this->accountRepository->getClassName(), $id);
        }

        return $this->getApiObject($account, $locale);
    }
public function getByIdAndInclude ( $ id , $ locale , $ includes ) { $ account = $ this -> accountRepository -> findAccountById ( $ id , in_array ( 'contacts' , $ includes ) ) ; if ( ! $ account ) { throw new EntityNotFoundException ( $ this -> accountRepository -> getClassName ( ) , $ id ) ; } return $ this -> getApiObject ( $ account , $ locale ) ; }
Gets account by id - can include relations.

@param int $id
@param string $locale
@param array $includes

@throws EntityNotFoundException

@return AccountApi
Gets account by id - can include relations .