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

Public Member Functions | Protected Member Functions | List of all members
eZ\Publish\Core\FieldType\Page\HashConverter Class Reference

Class HashConverter converts between a Page field type Value object and a representation of the same in a plain hash format. More...

## Public Member Functions
| convertFromValue (Value $value)
| Converts the given $value into a plain hash format. More...
| convertToValue ($hash)
| Converts the given $hash to a Value defined by the field type. More...

## Protected Member Functions
| convertZoneToHash (Zone $zone)
| Converts the given $zone into a plain hash format. More...
| convertBlockToHash (Block $block)
| Converts the given $block into a plain hash format. More...
| convertItemToHash (Item $item)
| Converts the given $item into a plain hash format. More...
| convertZoneFromHash ($hash)
| Converts the given $hash to a Zone node. More...
| convertBlockFromHash ($hash)
| Converts the given $hash to a Block node. More...
| convertItemFromHash ($hash)
| Converts the given $hash to a Item node. More...

## Detailed Description

Class HashConverter converts between a Page field type Value object and a representation of the same in a plain hash format.

Definition at line 18 of file HashConverter.php.

## Member Function Documentation

## ◆ convertBlockFromHash()

eZ\Publish\Core\FieldType\Page\HashConverter::convertBlockFromHash | ( |  | $hash | ) |
| protected

Converts the given $hash to a Block node.

Parameters

  mixed | $hash |

Returns
  \eZ\Publish\Core\FieldType\Page\Parts\Block

Definition at line 226 of file HashConverter.php.

References eZ\Publish\Core\FieldType\Page\HashConverter\convertItemFromHash().

Referenced by eZ\Publish\Core\FieldType\Page\HashConverter\convertZoneFromHash().

## ◆ convertBlockToHash()

eZ\Publish\Core\FieldType\Page\HashConverter::convertBlockToHash | ( | Block | $block | ) |
| protected

Converts the given $block into a plain hash format.

Parameters

  \eZ\Publish\Core\FieldType\Page\Parts\Block | $block |

Returns
  array

Definition at line 97 of file HashConverter.php.

References eZ\Publish\Core\FieldType\Page\HashConverter\convertItemToHash(), and eZ\Publish\Core\FieldType\Page\Parts\Base\getState().

Referenced by eZ\Publish\Core\FieldType\Page\HashConverter\convertZoneToHash().

## ◆ convertFromValue()

eZ\Publish\Core\FieldType\Page\HashConverter::convertFromValue | ( | Value | $value | ) |

Converts the given $value into a plain hash format.

Parameters

  \eZ\Publish\Core\FieldType\Page\Value | $value |

Returns
  array

Definition at line 27 of file HashConverter.php.

References eZ\Publish\Core\FieldType\Page\HashConverter\convertZoneToHash().

## ◆ convertItemFromHash()

eZ\Publish\Core\FieldType\Page\HashConverter::convertItemFromHash | ( |  | $hash | ) |
| protected

Converts the given $hash to a Item node.

Parameters

  mixed | $hash |

Returns
  \eZ\Publish\Core\FieldType\Page\Parts\Item

Definition at line 248 of file HashConverter.php.

Referenced by eZ\Publish\Core\FieldType\Page\HashConverter\convertBlockFromHash().

## ◆ convertItemToHash()

eZ\Publish\Core\FieldType\Page\HashConverter::convertItemToHash | ( | Item | $item | ) |
| protected

Converts the given $item into a plain hash format.

Parameters

  \eZ\Publish\Core\FieldType\Page\Parts\Item | $item |

Returns
  array

Definition at line 139 of file HashConverter.php.

References eZ\Publish\Core\FieldType\Page\Parts\Item\getState().

Referenced by eZ\Publish\Core\FieldType\Page\HashConverter\convertBlockToHash().

## ◆ convertToValue()

eZ\Publish\Core\FieldType\Page\HashConverter::convertToValue | ( |  | $hash | ) |

Converts the given $hash to a Value defined by the field type.

Parameters

  mixed | $hash |

Returns
  \eZ\Publish\Core\FieldType\Page\Value

Definition at line 182 of file HashConverter.php.

References eZ\Publish\Core\FieldType\Page\HashConverter\convertZoneFromHash().

## ◆ convertZoneFromHash()

eZ\Publish\Core\FieldType\Page\HashConverter::convertZoneFromHash | ( |  | $hash | ) |
| protected

Converts the given $hash to a Zone node.

Parameters

  mixed | $hash |

Returns
  \eZ\Publish\Core\FieldType\Page\Parts\Zone

Definition at line 204 of file HashConverter.php.

References eZ\Publish\Core\FieldType\Page\HashConverter\convertBlockFromHash().

Referenced by eZ\Publish\Core\FieldType\Page\HashConverter\convertToValue().

## ◆ convertZoneToHash()

eZ\Publish\Core\FieldType\Page\HashConverter::convertZoneToHash | ( | Zone | $zone | ) |
| protected

Converts the given $zone into a plain hash format.

Parameters

  \eZ\Publish\Core\FieldType\Page\Parts\Zone | $zone |

Returns
  array

Definition at line 61 of file HashConverter.php.

References eZ\Publish\Core\FieldType\Page\HashConverter\convertBlockToHash(), and eZ\Publish\Core\FieldType\Page\Parts\Base\getState().

Referenced by eZ\Publish\Core\FieldType\Page\HashConverter\convertFromValue().

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

- HashConverter.php

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