Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter Class Reference
Inheritance diagram for eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter:

## Public Member Functions
| toStorageValue (FieldValue $value, StorageFieldValue $storageFieldValue)
| Converts data from $value to $storageFieldValue. More...
| toFieldValue (StorageFieldValue $value, FieldValue $fieldValue)
| Converts data from $value to $fieldValue. More...
| toStorageFieldDefinition (FieldDefinition $fieldDef, StorageFieldDefinition $storageDef)
| Converts field definition data in $fieldDef into $storageFieldDef. More...
| toFieldDefinition (StorageFieldDefinition $storageDef, FieldDefinition $fieldDef)
| Converts field definition data in $storageDef into $fieldDef. More...
| getIndexColumn ()
| Returns the name of the index column in the attribute table. More...

## Static Public Member Functions
static | create ()
| Factory for current class. More...

## Protected Member Functions
| generateDateIntervalXML (DateInterval $dateInterval)
| Generates the internal XML structure for $dateInterval, used for date adjustment. More...
| getDateIntervalFromXML ($xmlText)
| Generates a DateInterval object from $xmlText. More...

## Detailed Description

Definition at line 21 of file DateAndTimeConverter.php.

## Member Function Documentation

## ◆ create()

static eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter::create | ( |  | ) |
| static

Factory for current class.

Note: Class should instead be configured as service if it gains dependencies.

Deprecated:
  since 6.8, will be removed in 7.x, use default constructor instead.

Returns
  \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter

Definition at line 32 of file DateAndTimeConverter.php.

## ◆ generateDateIntervalXML()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter::generateDateIntervalXML | ( | DateInterval | $dateInterval | ) |
| protected

Generates the internal XML structure for $dateInterval, used for date adjustment.

Parameters

  \DateInterval | $dateInterval |

Returns
  string The generated XML string

Definition at line 161 of file DateAndTimeConverter.php.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter\toStorageFieldDefinition().

## ◆ getDateIntervalFromXML()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter::getDateIntervalFromXML | ( |  | $xmlText | ) |
| protected

Generates a DateInterval object from $xmlText.

Parameters

  string | $xmlText |

Returns
  \DateInterval

Definition at line 209 of file DateAndTimeConverter.php.

## ◆ getIndexColumn()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter::getIndexColumn | ( |  | ) |

Returns the name of the index column in the attribute table.

Returns the name of the index column the datatype uses, which is either "sort_key_int" or "sort_key_string". This column is then used for filtering and sorting for this type.

Returns
  string

Implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter.

Definition at line 149 of file DateAndTimeConverter.php.

## ◆ toFieldDefinition()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter::toFieldDefinition | ( | StorageFieldDefinition | $storageDef,
|  | FieldDefinition | $fieldDef
| ) |  |

Converts field definition data in $storageDef into $fieldDef.

Parameters

  \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition | $storageDef |
  \eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition | $fieldDef |

Implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter.

Definition at line 97 of file DateAndTimeConverter.php.

References eZ\Publish\SPI\Persistence\Content\FieldValue\$data.

## ◆ toFieldValue()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter::toFieldValue | ( | StorageFieldValue | $value,
|  | FieldValue | $fieldValue
| ) |  |

Converts data from $value to $fieldValue.

Parameters

  \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue | $value |
  \eZ\Publish\SPI\Persistence\Content\FieldValue | $fieldValue |

Implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter.

Definition at line 57 of file DateAndTimeConverter.php.

## ◆ toStorageFieldDefinition()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter::toStorageFieldDefinition | ( | FieldDefinition | $fieldDef,
|  | StorageFieldDefinition | $storageDef
| ) |  |

Converts field definition data in $fieldDef into $storageFieldDef.

Parameters

  \eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition | $fieldDef |
  \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition | $storageDef |

Implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter.

Definition at line 76 of file DateAndTimeConverter.php.

References eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter\generateDateIntervalXML().

## ◆ toStorageValue()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter::toStorageValue | ( | FieldValue | $value,
|  | StorageFieldValue | $storageFieldValue
| ) |  |

Converts data from $value to $storageFieldValue.

Parameters

  \eZ\Publish\SPI\Persistence\Content\FieldValue | $value |
  \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue | $storageFieldValue |

Implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter.

Definition at line 43 of file DateAndTimeConverter.php.

The documentation for this class was generated from the following file:

- DateAndTimeConverter.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.