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

MapLocationStorage.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\FieldType\MapLocation;
8
9 use eZ\Publish\SPI\FieldType\GatewayBasedStorage;
10 use eZ\Publish\SPI\Persistence\Content\VersionInfo;
11 use eZ\Publish\SPI\Persistence\Content\Field;
12
16 class MapLocationStorage extends GatewayBasedStorage
17 {
19 protected $gateway;
20
30 public function storeFieldData(VersionInfo $versionInfo, Field $field, array $context)
31 {
32 return $this->gateway->storeFieldData($versionInfo, $field);
33 }
34
44 public function getFieldData(VersionInfo $versionInfo, Field $field, array $context)
45 {
46 $this->gateway->getFieldData($versionInfo, $field);
47 }
48
56 public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array $context)
57 {
58 $this->gateway->deleteFieldData($versionInfo, $fieldIds);
59 }
60
66 public function hasFieldData()
67 {
68 return true;
69 }
70
78 public function getIndexData(VersionInfo $versionInfo, Field $field, array $context)
79 {
80 return is_array($field->value->externalData) ? $field->value->externalData['address'] : null;
81 }
82 }
eZ\Publish\Core\FieldType\MapLocation\MapLocationStorage
Storage for the MapLocation field type.
Definition: MapLocationStorage.php:17
eZ\Publish\Core\FieldType\MapLocation\MapLocationStorage\deleteFieldData
deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array $context)
Definition: MapLocationStorage.php:56
eZ\Publish\Core\FieldType\MapLocation\MapLocationStorage\storeFieldData
storeFieldData(VersionInfo $versionInfo, Field $field, array $context)
Definition: MapLocationStorage.php:30
eZ\Publish\Core\FieldType\MapLocation\MapLocationStorage\getFieldData
getFieldData(VersionInfo $versionInfo, Field $field, array $context)
Populates $field value property based on the external data.
Definition: MapLocationStorage.php:44
eZ\Publish\Core\FieldType\MapLocation\MapLocationStorage\$gateway
$gateway
Definition: MapLocationStorage.php:19
eZ\Publish\Core\FieldType\MapLocation\MapLocationStorage\getIndexData
getIndexData(VersionInfo $versionInfo, Field $field, array $context)
Definition: MapLocationStorage.php:78
eZ\Publish\Core\FieldType\MapLocation\MapLocationStorage\hasFieldData
hasFieldData()
Checks if field type has external data to deal with.
Definition: MapLocationStorage.php:66
eZ\Publish\SPI\FieldType\GatewayBasedStorage
Field Type External Storage gateway base class.
Definition: SPI/FieldType/GatewayBasedStorage.php:16
eZ\Publish\SPI\Persistence\Content\Field
Definition: SPI/Persistence/Content/Field.php:12
eZ\Publish\SPI\Persistence\Content\VersionInfo
This class holds version information data.
Definition: SPI/Persistence/Content/VersionInfo.php:15
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.