Neos\Neos\TypeConverter\EntityToIdentityConverter::canConvertFrom PHP Méthode

canConvertFrom() public méthode

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.
Résultat 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