src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
protected function updatePhone(Phone $phone, $entry)
    {
        $success = true;

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

        if (!$phoneType) {
            throw new EntityNotFoundException(self::$phoneTypeEntityName, $entry['phoneType']['id']);
        } else {
            $phone->setPhone($entry['phone']);
            $phone->setPhoneType($phoneType);
        }

        return $success;
    }
protected function updatePhone(Phone $phone, $entry)
    {
        $success = true;

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

        if (!$phoneType) {
            throw new EntityNotFoundException(self::$phoneTypeEntityName, $entry['phoneType']['id']);
        } else {
            $phone->setPhone($entry['phone']);
            $phone->setPhoneType($phoneType);
        }

        return $success;
    }
protected function updatePhone ( Phone $ phone , $ entry ) { $ success = true ; $ phoneType = $ this -> em -> getRepository ( self :: $ phoneTypeEntityName ) -> find ( $ entry [ 'phoneType' ] [ 'id' ] ) ; if ( ! $ phoneType ) { throw new EntityNotFoundException ( self :: $ phoneTypeEntityName , $ entry [ 'phoneType' ] [ 'id' ] ) ; } else { $ phone -> setPhone ( $ entry [ 'phone' ] ) ; $ phone -> setPhoneType ( $ phoneType ) ; } return $ success ; }
Updates the given phone.

@param Phone $phone The phone object to update
@param $entry The entry with the new data

@throws EntityNotFoundException

@return bool True if successful, otherwise false
Updates the given phone .