ParameterContentHelper
in package
Applies the content filters of a parameter (`disallowUrl`, `disallowBlacklistedWords`) in one phase.
The phase is either save (ContentFilterMode::OnSave) or render (ContentFilterMode::OnRender).
A replacement happens only when the parameter's mode equals the current phase, so one method
serves both save time (form trait) and render time (get(), specification).
Table of Contents
Constants
- URL_PLACEHOLDER : mixed = '[URL]'
- WORD_PLACEHOLDER : mixed = '[***]'
Methods
- apply() : string
Constants
URL_PLACEHOLDER
public
mixed
URL_PLACEHOLDER
= '[URL]'
WORD_PLACEHOLDER
public
mixed
WORD_PLACEHOLDER
= '[***]'
Methods
apply()
public
static apply(string $value, ContentFilterMode $urlMode, ContentFilterMode $wordMode, array<string|int, string> $blacklistedWords, ContentFilterMode $phase) : string
Parameters
- $value : string
- $urlMode : ContentFilterMode
- $wordMode : ContentFilterMode
- $blacklistedWords : array<string|int, string>
- $phase : ContentFilterMode