src/Sulu/Component/Webspace/Environment.php
public function addUrl(Url $url)
    {
        $this->urls[] = $url;

        $url->setEnvironment($this->getType());

        if ($url->isMain() || !$this->mainUrl) {
            $this->setMainUrl($url);
        }
    }
public function addUrl(Url $url)
    {
        $this->urls[] = $url;

        $url->setEnvironment($this->getType());

        if ($url->isMain() || !$this->mainUrl) {
            $this->setMainUrl($url);
        }
    }
public function addUrl ( Url $ url ) { $ this -> urls [ ] = $ url ; $ url -> setEnvironment ( $ this -> getType ( ) ) ; if ( $ url -> isMain ( ) || ! $ this -> mainUrl ) { $ this -> setMainUrl ( $ url ) ; } }
Adds a new url to this environment.

@param $url Url The url to add
Adds a new url to this environment .