src/Utilities/Miscellaneous.php
public static function checkboxValue2Boolean($checkboxValue)
    {
        $mapping = [
            'on'  => true,
            'off' => false,
        ];

        $clearValue = strtolower(trim($checkboxValue));

        if (isset($mapping[$clearValue])) {
            return $mapping[$clearValue];
        }

        return false;
    }
public static function checkboxValue2Boolean($checkboxValue)
    {
        $mapping = [
            'on'  => true,
            'off' => false,
        ];

        $clearValue = strtolower(trim($checkboxValue));

        if (isset($mapping[$clearValue])) {
            return $mapping[$clearValue];
        }

        return false;
    }
public static function checkboxValue2Boolean ( $ checkboxValue ) { $ mapping = [ 'on' => true , 'off' => false , ] ; $ clearValue = strtolower ( trim ( $ checkboxValue ) ) ; if ( isset ( $ mapping [ $ clearValue ] ) ) { return $ mapping [ $ clearValue ] ; } return false ; }
Converts checkbox value to boolean

@param string $checkboxValue Checkbox value
@return bool
Converts checkbox value to boolean