src/Sulu/Bundle/ContactBundle/Entity/Contact.php
protected function getMainAccountContact()
    {
        $accountContacts = $this->getAccountContacts();

        if (!is_null($accountContacts)) {
            /** @var AccountContact $accountContact */
            foreach ($accountContacts as $accountContact) {
                if ($accountContact->getMain()) {
                    return $accountContact;
                }
            }
        }

        return;
    }
protected function getMainAccountContact()
    {
        $accountContacts = $this->getAccountContacts();

        if (!is_null($accountContacts)) {
            /** @var AccountContact $accountContact */
            foreach ($accountContacts as $accountContact) {
                if ($accountContact->getMain()) {
                    return $accountContact;
                }
            }
        }

        return;
    }
protected function getMainAccountContact ( ) { $ accountContacts = $ this -> getAccountContacts ( ) ; if ( ! is_null ( $ accountContacts ) ) { /** @var AccountContact $accountContact */ foreach ( $ accountContacts as $ accountContact ) { if ( $ accountContact -> getMain ( ) ) { return $ accountContact ; } } } return ; }
Returns main account contact.
Returns main account contact .