src/Contao/View/Contao2BackendView/TreePicker.php
private function convertValue($value)
    {
        if (empty($value)) {
            return null;
        }

        if (\is_array($value)) {
            return $value;
        }

        switch ($this->fieldType) {
            case 'radio':
                return $value;
            case 'checkbox':
                $delimiter = (false !== \stripos($value, "\t")) ? "\t" : ',';

                return StringUtil::trimsplit($delimiter, $value);
            default:
        }
        throw new \RuntimeException('Unknown field type encountered: ' . $this->fieldType);
    }
private function convertValue($value)
    {
        if (empty($value)) {
            return null;
        }

        if (\is_array($value)) {
            return $value;
        }

        switch ($this->fieldType) {
            case 'radio':
                return $value;
            case 'checkbox':
                $delimiter = (false !== \stripos($value, "\t")) ? "\t" : ',';

                return StringUtil::trimsplit($delimiter, $value);
            default:
        }
        throw new \RuntimeException('Unknown field type encountered: ' . $this->fieldType);
    }
private function convertValue ( $ value ) { if ( empty ( $ value ) ) { return null ; } if ( \ is_array ( $ value ) ) { return $ value ; } switch ( $ this -> fieldType ) { case 'radio' : return $ value ; case 'checkbox' : $ delimiter = ( false !== \ stripos ( $ value , "\t" ) ) ? "\t" : ',' ; return StringUtil :: trimsplit ( $ delimiter , $ value ) ; default : } throw new \ RuntimeException ( 'Unknown field type encountered: ' . $ this -> fieldType ) ; }
Convert the value according to the configured fieldtype.

@param mixed $value The value to convert.

@return mixed

@throws \RuntimeException When an unknown field type is encountered.
Convert the value according to the configured fieldtype .