InputfieldToggle::sanitizeValue()

Sanitize the value to be one ofthe constants: valueYes, valueNo, valueOther, valueUnknown

Usage

// basic usage
$int = $inputfieldToggle->sanitizeValue($value);

// usage with all arguments
$int = $inputfieldToggle->sanitizeValue($value, bool $getName = false);

Arguments

NameType(s)Description
$valuestring int

Value to sanitize

$getName (optional)bool

Get internal name of value rather than value? Default:false

Return value

int string


InputfieldToggle methods and properties

API reference based on ProcessWire core version 3.0.252