portalIsSet) { throw new NotSettableException("Can't set portal second time."); } $this->portalIsSet = true; $this->setForced(self::ID_PORTAL, $portal); $data = []; foreach ($portal->getSettingsAttributeList() as $attribute) { $data[$attribute] = $portal->get($attribute); } try { /** @var Config $config */ $config = $this->get(self::ID_CONFIG); $config->setPortalParameters($data); /** @var AclManager $aclManager */ $aclManager = $this->get(self::ID_ACL_MANAGER); } catch (NotFoundExceptionInterface) { throw new LogicException(); } $aclManager->setPortal($portal); } }