ExternalInfoPlatformUrlRepositoryWp
in package
implements
ExternalInfoPlatformUrlRepository
FinalYes
Table of Contents
Interfaces
- ExternalInfoPlatformUrlRepository
- Repository for ExternalInfoPlatform aggregate.
Constants
- DEFAULT_FALLBACK = ''
- DEFAULT_HEADLINE = ''
- DEFAULT_HEIGHT = 720
- DEFAULT_ID = 1
- DEFAULT_INTRO = ''
- DEFAULT_LINK_LABEL = ''
- DEFAULT_MODE = 'embed'
- OPTION_FALLBACK = 'webviep_external_platform_fallback'
- OPTION_HEADLINE = 'webviep_external_platform_headline'
- OPTION_HEIGHT = 'webviep_external_platform_height'
- OPTION_ID = 'webviep_external_platform_id'
- OPTION_INTRO = 'webviep_external_platform_intro'
- OPTION_LINK_LABEL = 'webviep_external_platform_link_label'
- OPTION_MODE = 'webviep_external_platform_mode'
- OPTION_URL = 'webviep_external_platform_url'
Methods
- get() : ExternalInfoPlatform|null
- Load settings from WP options.
- getFallbackText() : string
- Get stored fallback text.
- getHeadline() : string
- Get stored headline.
- getHeight() : int
- Get stored iframe height (min 200).
- getIntro() : string
- Get stored intro text.
- getLinkLabel() : string
- Get stored link label.
- getMode() : string
- Get stored mode with fallback to default.
- getUrl() : string
- Get stored URL (raw, sanitized).
- save() : void
- Persist settings to WP options.
- updateAll() : void
- Convenience method to update all relevant settings at once.
- getIdValue() : int
- Get ID value from options with fallback.
- sanitizeMode() : string
- Sanitize mode value.
Constants
DEFAULT_FALLBACK
private
mixed
DEFAULT_FALLBACK
= ''
DEFAULT_HEADLINE
private
mixed
DEFAULT_HEADLINE
= ''
DEFAULT_HEIGHT
private
mixed
DEFAULT_HEIGHT
= 720
DEFAULT_ID
private
mixed
DEFAULT_ID
= 1
DEFAULT_INTRO
private
mixed
DEFAULT_INTRO
= ''
DEFAULT_LINK_LABEL
private
mixed
DEFAULT_LINK_LABEL
= ''
DEFAULT_MODE
private
mixed
DEFAULT_MODE
= 'embed'
OPTION_FALLBACK
private
mixed
OPTION_FALLBACK
= 'webviep_external_platform_fallback'
OPTION_HEADLINE
private
mixed
OPTION_HEADLINE
= 'webviep_external_platform_headline'
OPTION_HEIGHT
private
mixed
OPTION_HEIGHT
= 'webviep_external_platform_height'
OPTION_ID
private
mixed
OPTION_ID
= 'webviep_external_platform_id'
OPTION_INTRO
private
mixed
OPTION_INTRO
= 'webviep_external_platform_intro'
OPTION_LINK_LABEL
private
mixed
OPTION_LINK_LABEL
= 'webviep_external_platform_link_label'
OPTION_MODE
private
mixed
OPTION_MODE
= 'webviep_external_platform_mode'
OPTION_URL
private
mixed
OPTION_URL
= 'webviep_external_platform_url'
Methods
get()
Load settings from WP options.
public
get() : ExternalInfoPlatform|null
Return values
ExternalInfoPlatform|nullgetFallbackText()
Get stored fallback text.
public
getFallbackText() : string
Return values
stringgetHeadline()
Get stored headline.
public
getHeadline() : string
Return values
stringgetHeight()
Get stored iframe height (min 200).
public
getHeight() : int
Return values
intgetIntro()
Get stored intro text.
public
getIntro() : string
Return values
stringgetLinkLabel()
Get stored link label.
public
getLinkLabel() : string
Return values
stringgetMode()
Get stored mode with fallback to default.
public
getMode() : string
Return values
stringgetUrl()
Get stored URL (raw, sanitized).
public
getUrl() : string
Return values
stringsave()
Persist settings to WP options.
public
save(ExternalInfoPlatform $settings) : void
Parameters
- $settings : ExternalInfoPlatform
-
Settings aggregate.
updateAll()
Convenience method to update all relevant settings at once.
public
updateAll(string $url, string $mode, string $headline, string $intro, string $fallbackText, string $linkLabel, int $height) : void
Parameters
- $url : string
-
External platform URL.
- $mode : string
-
embed|link|redirect.
- $headline : string
-
Headline text.
- $intro : string
-
Intro text.
- $fallbackText : string
-
Fallback message.
- $linkLabel : string
-
Link button label.
- $height : int
-
Iframe height.
getIdValue()
Get ID value from options with fallback.
private
getIdValue() : int
Return values
intsanitizeMode()
Sanitize mode value.
private
sanitizeMode(string $mode) : string
Parameters
- $mode : string
-
Mode input.