src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
public function processUrls($contact, $urls)
    {
        $get = function($url) {
            return $url->getId();
        };

        $delete = function($url) use ($contact) {
            return $contact->removeUrl($url);
        };

        $update = function($url, $matchedEntry) {
            return $this->updateUrl($url, $matchedEntry);
        };

        $add = function($url) use ($contact) {
            return $this->addUrl($contact, $url);
        };

        $entities = $contact->getUrls();

        $result = $this->processSubEntities(
            $entities,
            $urls,
            $get,
            $add,
            $update,
            $delete
        );

        $this->resetIndexOfSubentites($entities);

        // check main
        $this->setMainUrl($contact);

        return $result;
    }
public function processUrls($contact, $urls)
    {
        $get = function($url) {
            return $url->getId();
        };

        $delete = function($url) use ($contact) {
            return $contact->removeUrl($url);
        };

        $update = function($url, $matchedEntry) {
            return $this->updateUrl($url, $matchedEntry);
        };

        $add = function($url) use ($contact) {
            return $this->addUrl($contact, $url);
        };

        $entities = $contact->getUrls();

        $result = $this->processSubEntities(
            $entities,
            $urls,
            $get,
            $add,
            $update,
            $delete
        );

        $this->resetIndexOfSubentites($entities);

        // check main
        $this->setMainUrl($contact);

        return $result;
    }
public function processUrls ( $ contact , $ urls ) { $ get = function ( $ url ) { return $ url -> getId ( ) ; } ; $ delete = function ( $ url ) use ( $ contact ) { return $ contact -> removeUrl ( $ url ) ; } ; $ update = function ( $ url , $ matchedEntry ) { return $ this -> updateUrl ( $ url , $ matchedEntry ) ; } ; $ add = function ( $ url ) use ( $ contact ) { return $ this -> addUrl ( $ contact , $ url ) ; } ; $ entities = $ contact -> getUrls ( ) ; $ result = $ this -> processSubEntities ( $ entities , $ urls , $ get , $ add , $ update , $ delete ) ; $ this -> resetIndexOfSubentites ( $ entities ) ; // check main $ this -> setMainUrl ( $ contact ) ; return $ result ; }
Process all urls of request.

@param $contact The contact to be processed
@param array $urls

@return bool True if the processing was successful, otherwise false
Process all urls of request .