class DateStringConverter extends AbstractTypeConverter (View source)

Converts a Date to a JavaScript compatible representation, meaning also to convert it to UTC timezone.

Properties

protected string[] $sourceTypes

The source types this converter can convert.

protected string $targetType

The target type this converter can convert to.

protected int $priority

The priority for this converter.

Methods

string
convertFrom(DateTime $source, string $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)

{@inheritdoc}

Details

string convertFrom(DateTime $source, string $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)

{@inheritdoc}

Parameters

DateTime $source
string $targetType
array $convertedChildProperties
PropertyMappingConfigurationInterface $configuration

Return Value

string

the target type