src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
public function createMainAccountContact(Contact $contact, AccountInterface $account, $position = null)
    {
        $accountContact = new AccountContact();
        $accountContact->setAccount($account);
        $accountContact->setContact($contact);
        $accountContact->setMain(true);
        $this->em->persist($accountContact);
        $contact->addAccountContact($accountContact);
        $accountContact->setPosition($position);

        return $accountContact;
    }
public function createMainAccountContact(Contact $contact, AccountInterface $account, $position = null)
    {
        $accountContact = new AccountContact();
        $accountContact->setAccount($account);
        $accountContact->setContact($contact);
        $accountContact->setMain(true);
        $this->em->persist($accountContact);
        $contact->addAccountContact($accountContact);
        $accountContact->setPosition($position);

        return $accountContact;
    }
public function createMainAccountContact ( Contact $ contact , AccountInterface $ account , $ position = null ) { $ accountContact = new AccountContact ( ) ; $ accountContact -> setAccount ( $ account ) ; $ accountContact -> setContact ( $ contact ) ; $ accountContact -> setMain ( true ) ; $ this -> em -> persist ( $ accountContact ) ; $ contact -> addAccountContact ( $ accountContact ) ; $ accountContact -> setPosition ( $ position ) ; return $ accountContact ; }
creates a new main Account Contacts relation.

@param Contact $contact
@param AccountInterface $account
@param $position

@return AccountContact
creates a new main Account Contacts relation .