Documentation

FieldType : string
in package

Closed catalog of admin field controls the declarative settings framework can render. Each case knows its save-time default sanitizer so a plugin gets safe persistence without writing one callback per field.

Table of Contents

Cases

Checkbox  = 'checkbox'
CheckboxList  = 'checkbox_list'
Email  = 'email'
Number  = 'number'
Password  = 'password'
RawHtml  = 'raw_html'
Rich HTML field. Its default save-time sanitizer runs the value through {@see SanitizeSupport::ksesPost()} (allowed post markup, scripts stripped).
Select  = 'select'
Text  = 'text'
Textarea  = 'textarea'

Methods

defaultSanitizer()  : callable
Save-time sanitizer applied when the field declares none.

Cases

RawHtml

Rich HTML field. Its default save-time sanitizer runs the value through {@see SanitizeSupport::ksesPost()} (allowed post markup, scripts stripped).

A plugin that must persist unfiltered markup declares its own sanitizer on the Field; that opt-in is the deliberate escape hatch.

Methods

defaultSanitizer()

Save-time sanitizer applied when the field declares none.

public defaultSanitizer() : callable
Return values
callable
On this page

Search results