src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
public function contactIsEmployeeOfAccount($contact, $account)
    {
        if ($contact->getAccountContacts() && !$contact->getAccountContacts()->isEmpty()) {
            foreach ($contact->getAccountContacts() as $accountContact) {
                if ($accountContact->getAccount()->getId() === $account->getId()) {
                    return true;
                }
            }
        }

        return false;
    }
public function contactIsEmployeeOfAccount($contact, $account)
    {
        if ($contact->getAccountContacts() && !$contact->getAccountContacts()->isEmpty()) {
            foreach ($contact->getAccountContacts() as $accountContact) {
                if ($accountContact->getAccount()->getId() === $account->getId()) {
                    return true;
                }
            }
        }

        return false;
    }
public function contactIsEmployeeOfAccount ( $ contact , $ account ) { if ( $ contact -> getAccountContacts ( ) && ! $ contact -> getAccountContacts ( ) -> isEmpty ( ) ) { foreach ( $ contact -> getAccountContacts ( ) as $ accountContact ) { if ( $ accountContact -> getAccount ( ) -> getId ( ) === $ account -> getId ( ) ) { return true ; } } } return false ; }
checks if an account is employee of a company.

@param $contact
@param $account

@return bool
checks if an account is employee of a company .