Sulu\Bundle\SecurityBundle\Entity\User::getContact PHP Method

getContact() public method

Get contact.
public getContact ( ) : Sulu\Component\Contact\Model\ContactInterface
return Sulu\Component\Contact\Model\ContactInterface
    public function getContact()
    {
        return $this->contact;
    }

Usage Example

 /**
  * @param User $user
  */
 protected function persistContact(User $user)
 {
     if ($contact = $user->getContact()) {
         $this->archiveEmail($user, $contact);
         $this->persistContactAddress($contact);
         $this->entityManager->persist($contact);
     }
 }