src/Sulu/Component/Webspace/Loader/XmlFileLoader10.php
protected function generateEnvironments(\DOMNode $portalNode, Portal $portal)
    {
        foreach ($this->xpath->query('x:environments/x:environment', $portalNode) as $environmentNode) {
            /** @var \DOMNode $environmentNode */
            $environment = new Environment();
            $environment->setType($environmentNode->attributes->getNamedItem('type')->nodeValue);

            $this->generateUrls($environmentNode, $environment);
            $this->generateCustomUrls($environmentNode, $environment);

            $portal->addEnvironment($environment);
        }
    }
protected function generateEnvironments(\DOMNode $portalNode, Portal $portal)
    {
        foreach ($this->xpath->query('x:environments/x:environment', $portalNode) as $environmentNode) {
            /** @var \DOMNode $environmentNode */
            $environment = new Environment();
            $environment->setType($environmentNode->attributes->getNamedItem('type')->nodeValue);

            $this->generateUrls($environmentNode, $environment);
            $this->generateCustomUrls($environmentNode, $environment);

            $portal->addEnvironment($environment);
        }
    }
protected function generateEnvironments ( \ DOMNode $ portalNode , Portal $ portal ) { foreach ( $ this -> xpath -> query ( 'x:environments/x:environment' , $ portalNode ) as $ environmentNode ) { /** @var \DOMNode $environmentNode */ $ environment = new Environment ( ) ; $ environment -> setType ( $ environmentNode -> attributes -> getNamedItem ( 'type' ) -> nodeValue ) ; $ this -> generateUrls ( $ environmentNode , $ environment ) ; $ this -> generateCustomUrls ( $ environmentNode , $ environment ) ; $ portal -> addEnvironment ( $ environment ) ; } }
Generates the definitions for the available environments for this webspace.

@param \DOMNode $portalNode
@param Portal $portal
Generates the definitions for the available environments for this webspace .