app/controllers/landing_page_controller.rb
def build_denormalizer(cid:, default_locale:, locale_param:, landing_page_locale:, sitename:, cta:)
    search_path = ->(opts = {}) {
      PathHelpers.search_path(
        community_id: cid,
        logged_in: false,
        locale_param: locale_param,
        default_locale: default_locale,
        opts: opts
      )
    }

    # Application paths
    paths = build_paths(search_path, locale_param)

    marketplace_data = CLP::MarketplaceDataStore.marketplace_data(cid, landing_page_locale)
    name_display_type = marketplace_data["name_display_type"]

    category_data = CLP::CategoryStore.categories(cid, landing_page_locale, search_path)

    CLP::Denormalizer.new(
      link_resolvers: {
        "path" => CLP::LinkResolver::PathResolver.new(paths),
        "marketplace_data" => CLP::LinkResolver::MarketplaceDataResolver.new(marketplace_data, cta),
        "assets" => CLP::LinkResolver::AssetResolver.new(APP_CONFIG[:clp_asset_url], sitename),
        "translation" => CLP::LinkResolver::TranslationResolver.new(landing_page_locale),
        "category" => CLP::LinkResolver::CategoryResolver.new(category_data),
        "listing" => CLP::LinkResolver::ListingResolver.new(cid, landing_page_locale, locale_param, name_display_type)
      }
    )
  end
# Shorthand for accessing CustomLandingPage service namespace
Shorthand for accessing CustomLandingPage service namespace
Shorthand for accessing CustomLandingPage service namespace
def build_denormalizer(cid:, default_locale:, locale_param:, landing_page_locale:, sitename:, cta:)
    search_path = ->(opts = {}) {
      PathHelpers.search_path(
        community_id: cid,
        logged_in: false,
        locale_param: locale_param,
        default_locale: default_locale,
        opts: opts
      )
    }
    paths = build_paths(search_path, locale_param)
    marketplace_data = CLP::MarketplaceDataStore.marketplace_data(cid, landing_page_locale)
    name_display_type = marketplace_data["name_display_type"]
    category_data = CLP::CategoryStore.categories(cid, landing_page_locale, search_path)
    CLP::Denormalizer.new(
      link_resolvers: {
        "path" => CLP::LinkResolver::PathResolver.new(paths),
        "marketplace_data" => CLP::LinkResolver::MarketplaceDataResolver.new(marketplace_data, cta),
        "assets" => CLP::LinkResolver::AssetResolver.new(APP_CONFIG[:clp_asset_url], sitename),
        "translation" => CLP::LinkResolver::TranslationResolver.new(landing_page_locale),
        "category" => CLP::LinkResolver::CategoryResolver.new(category_data),
        "listing" => CLP::LinkResolver::ListingResolver.new(cid, landing_page_locale, locale_param, name_display_type)
      }
    )
  end
def build_denormalizer ( cid : , default_locale : , locale_param : , landing_page_locale : , sitename : , cta : ) search_path = -> ( opts = { } ) { PathHelpers . search_path ( community_id : cid , logged_in : false , locale_param : locale_param , default_locale : default_locale , opts : opts ) } paths = build_paths ( search_path , locale_param ) marketplace_data = CLP :: MarketplaceDataStore . marketplace_data ( cid , landing_page_locale ) name_display_type = marketplace_data [ "name_display_type" ] category_data = CLP :: CategoryStore . categories ( cid , landing_page_locale , search_path ) CLP :: Denormalizer . new ( link_resolvers : { "path" => CLP :: LinkResolver :: PathResolver . new ( paths ) , "marketplace_data" => CLP :: LinkResolver :: MarketplaceDataResolver . new ( marketplace_data , cta ) , "assets" => CLP :: LinkResolver :: AssetResolver . new ( APP_CONFIG [ :clp_asset_url ] , sitename ) , "translation" => CLP :: LinkResolver :: TranslationResolver . new ( landing_page_locale ) , "category" => CLP :: LinkResolver :: CategoryResolver . new ( category_data ) , "listing" => CLP :: LinkResolver :: ListingResolver . new ( cid , landing_page_locale , locale_param , name_display_type ) } ) end
Shorthand for accessing CustomLandingPage service namespace
Shorthand for accessing CustomLandingPage service namespace
# Application paths
cid
default_locale
locale_param
landing_page_locale
sitename
cta