\Patami\IPS\HelpersStringHelper

Provides string helper functions.

Summary

Methods
Properties
Constants
GetBooleanAsString()
GetBooleanAsYesNo()
GetBooleanAsOnOff()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

GetBooleanAsString()

GetBooleanAsString(boolean  $value, string|null  $locale = null) : string

Returns a translated text (yes/no) based on the given boolean value.

Parameters

boolean $value

Boolean value.

string|null $locale

Locale to be used for the conversion or null to use the IPS system locale.

Returns

string —

Translated text.

GetBooleanAsYesNo()

GetBooleanAsYesNo(boolean  $value, string|null  $locale = null) : string

Returns a translated text (yes/no) based on the given boolean value.

Parameters

boolean $value

Boolean value.

string|null $locale

Locale to be used for the conversion or null to use the IPS system locale.

Returns

string —

Translated text.

GetBooleanAsOnOff()

GetBooleanAsOnOff(boolean  $value, string|null  $locale = null) : string

Returns a translated text (on/off) based on the given boolean value.

Parameters

boolean $value

Boolean value.

string|null $locale

Locale to be used for the conversion or null to use the IPS system locale.

Returns

string —

Translated text.