src/Sulu/Bundle/ContactBundle/Contact/AccountManager.php
public function findAll($locale, $filter = null)
    {
        if ($filter) {
            $accountEntities = $this->accountRepository->findByFilter($filter);
        } else {
            $accountEntities = $this->accountRepository->findAll();
        }

        if (!empty($accountEntities)) {
            $accounts = [];
            foreach ($accountEntities as $account) {
                $accounts[] = $this->getApiObject($account, $locale);
            }

            return $accounts;
        }

        return;
    }
public function findAll($locale, $filter = null)
    {
        if ($filter) {
            $accountEntities = $this->accountRepository->findByFilter($filter);
        } else {
            $accountEntities = $this->accountRepository->findAll();
        }

        if (!empty($accountEntities)) {
            $accounts = [];
            foreach ($accountEntities as $account) {
                $accounts[] = $this->getApiObject($account, $locale);
            }

            return $accounts;
        }

        return;
    }
public function findAll ( $ locale , $ filter = null ) { if ( $ filter ) { $ accountEntities = $ this -> accountRepository -> findByFilter ( $ filter ) ; } else { $ accountEntities = $ this -> accountRepository -> findAll ( ) ; } if ( ! empty ( $ accountEntities ) ) { $ accounts = [ ] ; foreach ( $ accountEntities as $ account ) { $ accounts [ ] = $ this -> getApiObject ( $ account , $ locale ) ; } return $ accounts ; } return ; }
Returns all accounts.

@param string $locale
@param null $filter

@return array|null
Returns all accounts .