public function AddressExport::getFieldProperties in Entity Export CSV 8
Gets the field's properties.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $definition: The field definition.
Return value
array|\Drupal\Core\TypedData\DataDefinitionInterface[] The field properties.
Overrides FieldTypeExportBase::getFieldProperties
File
- src/
Plugin/ FieldTypeExport/ AddressExport.php, line 49
Class
- AddressExport
- Defines an Address field type export plugin.
Namespace
Drupal\entity_export_csv\Plugin\FieldTypeExportCode
public function getFieldProperties(FieldDefinitionInterface $definition) {
$properties = parent::getFieldProperties($definition);
$properties = array_reverse($properties);
$properties = $this
->moveKeyBefore($properties, 'address_line2', 'address_line1');
$properties = $this
->moveKeyBefore($properties, 'administrative_area', 'sorting_code');
$properties = $this
->moveKeyBefore($properties, 'locality', 'postal_code');
$this->properties = $properties;
return $this->properties;
}