src/Sulu/Component/Webspace/Manager/WebspaceCollection.php
public function getPortalInformations($environment, $types = null)
    {
        if (!isset($this->portalInformations[$environment])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown portal environment "%s"', $environment
            ));
        }
        if (null === $types) {
            return $this->portalInformations[$environment];
        }

        return array_filter(
            $this->portalInformations[$environment],
            function(PortalInformation $portalInformation) use ($types) {
                return in_array($portalInformation->getType(), $types);
            }
        );
    }
public function getPortalInformations($environment, $types = null)
    {
        if (!isset($this->portalInformations[$environment])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown portal environment "%s"', $environment
            ));
        }
        if (null === $types) {
            return $this->portalInformations[$environment];
        }

        return array_filter(
            $this->portalInformations[$environment],
            function(PortalInformation $portalInformation) use ($types) {
                return in_array($portalInformation->getType(), $types);
            }
        );
    }
public function getPortalInformations ( $ environment , $ types = null ) { if ( ! isset ( $ this -> portalInformations [ $ environment ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Unknown portal environment "%s"' , $ environment ) ) ; } if ( null === $ types ) { return $ this -> portalInformations [ $ environment ] ; } return array_filter ( $ this -> portalInformations [ $ environment ] , function ( PortalInformation $ portalInformation ) use ( $ types ) { return in_array ( $ portalInformation -> getType ( ) , $ types ) ; } ) ; }
Returns the portal informations for the given environment.

@param $environment string The environment to deliver
@param array|null $types Defines which typr of portals are requested (null for all)

@return \Sulu\Component\Webspace\PortalInformation[]
Returns the portal informations for the given environment .