Boolean fields in CultureHosts are often 1 or 0 in value. This formatter allows you to choose
human-friendly values such as 'yes' and 'no'.
Located at culturehosts-importer/src/Service/Formatters/Format_Boolean.php
| Methods |
public
|
__construct(string $true = 'Yes', string $false = 'No')
Choose new values to use for truthy/falsy values.
Choose new values to use for truthy/falsy values.
Parameters
| $true |
String to use for truthy values.
|
| $false |
String to use for falsy values.
|
|
#
|
public
|
run(mixed $value): mixed
Called for each field value being converted.
Called for each field value being converted.
Parameters
| $value |
The current value of the field.
|
Returns
Implements
|
#
|