Sulu\Component\Webspace\Manager\WebspaceManagerInterface::getPortalInformationsByWebspaceKey PHP Method

getPortalInformationsByWebspaceKey() public method

Returns the portal informations for the given webspace managed by this WebspaceManager.
public getPortalInformationsByWebspaceKey ( string $environment, $webspaceKey ) : PortalInformation[]
$environment string
return Sulu\Component\Webspace\PortalInformation[]
    public function getPortalInformationsByWebspaceKey($environment, $webspaceKey);

Usage Example

 /**
  * Extract portal-information and add them to serialization.
  *
  * @param Webspace $webspace
  * @param Context $context
  * @param JsonSerializationVisitor $visitor
  */
 private function appendPortalInformation(Webspace $webspace, Context $context, JsonSerializationVisitor $visitor)
 {
     $portalInformation = $this->webspaceManager->getPortalInformationsByWebspaceKey($this->environment, $webspace->getKey());
     $portalInformation = $context->accept(array_values($portalInformation));
     $visitor->addData('portalInformation', $portalInformation);
 }