Neos\Neos\TypeConverter\EntityToIdentityConverter::canConvertFrom PHP Method

canConvertFrom() public method

Check if the given object has an identity.
public canConvertFrom ( object $source, string $targetType ) : boolean
$source object the source data
$targetType string the type to convert to.
return boolean TRUE if this TypeConverter can convert from $source to $targetType, FALSE otherwise.
    public function canConvertFrom($source, $targetType)
    {
        $identifier = $this->persistenceManager->getIdentifierByObject($source);
        return $identifier !== null;
    }
EntityToIdentityConverter