src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
public function setMainPhone($entity)
    {
        // set main to first entry or to null
        if ($entity->getPhones()->isEmpty()) {
            $entity->setMainPhone(null);
        } else {
            $entity->setMainPhone($entity->getPhones()->first()->getPhone());
        }
    }
public function setMainPhone($entity)
    {
        // set main to first entry or to null
        if ($entity->getPhones()->isEmpty()) {
            $entity->setMainPhone(null);
        } else {
            $entity->setMainPhone($entity->getPhones()->first()->getPhone());
        }
    }
public function setMainPhone ( $ entity ) { // set main to first entry or to null if ( $ entity -> getPhones ( ) -> isEmpty ( ) ) { $ entity -> setMainPhone ( null ) ; } else { $ entity -> setMainPhone ( $ entity -> getPhones ( ) -> first ( ) -> getPhone ( ) ) ; } }
sets Entity's Main-Phone.

@param Contact|AccountInterface $entity
sets Entity s Main - Phone .