src/Sulu/Bundle/ContactBundle/Contact/AccountManager.php
public function findContactsByAccountId($id, $locale, $onlyFetchMainAccounts = false)
    {
        $contactsEntities = $this->contactRepository->findByAccountId(
            $id,
            null,
            false,
            $onlyFetchMainAccounts
        );

        if (!empty($contactsEntities)) {
            $contacts = [];
            foreach ($contactsEntities as $contact) {
                $contacts[] = new Contact($contact, $locale);
            }

            return $contacts;
        }

        return;
    }
public function findContactsByAccountId($id, $locale, $onlyFetchMainAccounts = false)
    {
        $contactsEntities = $this->contactRepository->findByAccountId(
            $id,
            null,
            false,
            $onlyFetchMainAccounts
        );

        if (!empty($contactsEntities)) {
            $contacts = [];
            foreach ($contactsEntities as $contact) {
                $contacts[] = new Contact($contact, $locale);
            }

            return $contacts;
        }

        return;
    }
public function findContactsByAccountId ( $ id , $ locale , $ onlyFetchMainAccounts = false ) { $ contactsEntities = $ this -> contactRepository -> findByAccountId ( $ id , null , false , $ onlyFetchMainAccounts ) ; if ( ! empty ( $ contactsEntities ) ) { $ contacts = [ ] ; foreach ( $ contactsEntities as $ contact ) { $ contacts [ ] = new Contact ( $ contact , $ locale ) ; } return $ contacts ; } return ; }
Returns contacts by account id.

@param int $id
@param string $locale
@param bool $onlyFetchMainAccounts

@return array|null
Returns contacts by account id .