PHP Class Neos\Neos\TypeConverter\EntityToIdentityConverter

Inheritance: extends Neos\Flow\Property\TypeConverter\AbstractTypeConverter
ファイルを表示 Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$priority integer The priority for this converter.
$sourceTypes array The source types this converter can convert.
$targetType string The target type this converter can convert to.

Public Methods

Method Description
canConvertFrom ( object $source, string $targetType ) : boolean Check if the given object has an identity.
convertFrom ( object $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : array Converts the given source object to an array containing the type and identity.

Method Details

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.

convertFrom() public method

Converts the given source object to an array containing the type and identity.
public convertFrom ( object $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : array
$source object
$targetType string
$convertedChildProperties array
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
return array

Property Details

$persistenceManager protected_oe property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface

$priority protected_oe property

The priority for this converter.
protected int $priority
return integer

$sourceTypes protected_oe property

The source types this converter can convert.
protected array $sourceTypes
return array

$targetType protected_oe property

The target type this converter can convert to.
protected string $targetType
return string