eZ\Publish\Core\FieldType\Keyword\Type::createValueFromInput PHP Method

createValueFromInput() protected method

Inspects given $inputValue and potentially converts it into a dedicated value object.
protected createValueFromInput ( mixed $inputValue ) : Value
$inputValue mixed
return Value The potentially converted and structurally plausible value.
    protected function createValueFromInput($inputValue)
    {
        if (is_string($inputValue)) {
            $inputValue = array($inputValue);
        }
        if (is_array($inputValue)) {
            $inputValue = new Value($inputValue);
        }
        return $inputValue;
    }