src/Contao/View/Contao2BackendView/TreePicker.php
public function valueToWidget($value)
    {
        if (!\in_array($this->fieldType, ['radio', 'checkbox'])) {
            throw new \RuntimeException('Unknown field type encountered: ' . $this->fieldType);
        }

        if (null === $value) {
            return '';
        }

        return ('radio' === $this->fieldType) ? $value : \implode(',', $value);
    }
public function valueToWidget($value)
    {
        if (!\in_array($this->fieldType, ['radio', 'checkbox'])) {
            throw new \RuntimeException('Unknown field type encountered: ' . $this->fieldType);
        }

        if (null === $value) {
            return '';
        }

        return ('radio' === $this->fieldType) ? $value : \implode(',', $value);
    }
public function valueToWidget ( $ value ) { if ( ! \ in_array ( $ this -> fieldType , [ 'radio' , 'checkbox' ] ) ) { throw new \ RuntimeException ( 'Unknown field type encountered: ' . $ this -> fieldType ) ; } if ( null === $ value ) { return '' ; } return ( 'radio' === $ this -> fieldType ) ? $ value : \ implode ( ',' , $ value ) ; }
Convert the value for the widget.

@param mixed $value The input value.

@return string

@throws \RuntimeException Throws an exception, if unknown field type encountered.
Convert the value for the widget .