src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
protected function updateEmail(Email $email, $entry)
    {
        $success = true;

        $emailType = $this->em
            ->getRepository(self::$emailTypeEntityName)
            ->find($entry['emailType']['id']);

        if (!$emailType) {
            throw new EntityNotFoundException(self::$emailTypeEntityName, $entry['emailType']['id']);
        } else {
            $email->setEmail($entry['email']);
            $email->setEmailType($emailType);
        }

        return $success;
    }
protected function updateEmail(Email $email, $entry)
    {
        $success = true;

        $emailType = $this->em
            ->getRepository(self::$emailTypeEntityName)
            ->find($entry['emailType']['id']);

        if (!$emailType) {
            throw new EntityNotFoundException(self::$emailTypeEntityName, $entry['emailType']['id']);
        } else {
            $email->setEmail($entry['email']);
            $email->setEmailType($emailType);
        }

        return $success;
    }
protected function updateEmail ( Email $ email , $ entry ) { $ success = true ; $ emailType = $ this -> em -> getRepository ( self :: $ emailTypeEntityName ) -> find ( $ entry [ 'emailType' ] [ 'id' ] ) ; if ( ! $ emailType ) { throw new EntityNotFoundException ( self :: $ emailTypeEntityName , $ entry [ 'emailType' ] [ 'id' ] ) ; } else { $ email -> setEmail ( $ entry [ 'email' ] ) ; $ email -> setEmailType ( $ emailType ) ; } return $ success ; }
Updates the given email address.

@param Email $email The email object to update
@param array $entry The entry with the new data

@return bool True if successful, otherwise false

@throws EntityNotFoundException
Updates the given email address .