PhoenixKit.Modules.Legal.LegalFramework (phoenix_kit v1.7.69)

Copy Markdown View Source

Struct representing a legal compliance framework.

Fields

  • id - Framework identifier (e.g., "gdpr", "ccpa")
  • name - Human-readable name (e.g., "GDPR (European Union)")
  • description - Brief description of the framework
  • regions - List of region codes where the framework applies
  • consent_model - Consent approach (:opt_in, :opt_out, or :notice)
  • required_pages - List of page slugs required by this framework
  • optional_pages - List of optional page slugs

Summary

Functions

Converts a plain map to a %LegalFramework{} struct.

Types

t()

@type t() :: %PhoenixKit.Modules.Legal.LegalFramework{
  consent_model: :opt_in | :opt_out | :notice,
  description: String.t() | nil,
  id: String.t(),
  name: String.t(),
  optional_pages: [String.t()],
  regions: [String.t()],
  required_pages: [String.t()]
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Converts a plain map to a %LegalFramework{} struct.