eZ\Publish\Core\FieldType\Relation\Type::createValueFromInput PHP Метод

createValueFromInput() защищенный Метод

Inspects given $inputValue and potentially converts it into a dedicated value object.
protected createValueFromInput ( integer | string | eZ\Publish\API\Repository\Values\Content\ContentInfo | Value $inputValue ) : Value
$inputValue integer | string | eZ\Publish\API\Repository\Values\Content\ContentInfo | Value
Результат Value The potentially converted and structurally plausible value.
    protected function createValueFromInput($inputValue)
    {
        // ContentInfo
        if ($inputValue instanceof ContentInfo) {
            $inputValue = new Value($inputValue->id);
        } elseif (is_integer($inputValue) || is_string($inputValue)) {
            // content id
            $inputValue = new Value($inputValue);
        }
        return $inputValue;
    }