def fromSponsorship()

in src/main/scala/com/gu/commercial/branding/Branding.scala [28:53]


  def fromSponsorship(webTitle: String, campaignColour: Option[String], sponsorship: Sponsorship): Branding = {
    Branding(
      brandingType = BrandingType.fromSponsorshipType(sponsorship.sponsorshipType),
      sponsorName = sponsorship.sponsorName,
      logo = Logo.make(
        title = webTitle,
        sponsorshipType = sponsorship.sponsorshipType,
        sponsorshipPackage = sponsorship.sponsorshipPackage,
        src = sponsorship.sponsorLogo,
        dimensions = sponsorship.sponsorLogoDimensions,
        link = sponsorship.sponsorLink
      ),
      logoForDarkBackground = sponsorship.highContrastSponsorLogo.map { src =>
        Logo.make(
          title = webTitle,
          sponsorshipType = sponsorship.sponsorshipType,
          sponsorshipPackage = sponsorship.sponsorshipPackage,
          src,
          dimensions = sponsorship.highContrastSponsorLogoDimensions,
          link = sponsorship.sponsorLink
        )
      },
      aboutThisLink = sponsorship.aboutLink getOrElse defaultAboutThisLink,
      hostedCampaignColour = campaignColour
    )
  }