public function FieldTypeExportBase::massageExportPropertyValue in Entity Export CSV 8
Massage the field item property value to CSV value.
Parameters
\Drupal\Core\Field\FieldItemInterface $field_item: The field item.
string $property_name: The property name.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.
array $options: An array of optional options.
Return value
mixed The CSV value.
Overrides FieldTypeExportInterface::massageExportPropertyValue
4 calls to FieldTypeExportBase::massageExportPropertyValue()
- AddressExport::massageExportPropertyValue in src/
Plugin/ FieldTypeExport/ AddressExport.php - Massage the field item property value to CSV value.
- FieldTypeExportBase::export in src/
Plugin/ FieldTypeExportBase.php - Export the value of a field.
- GeolocationExport::massageExportPropertyValue in src/
Plugin/ FieldTypeExport/ GeolocationExport.php - Massage the field item property value to CSV value.
- LinkExport::massageExportPropertyValue in src/
Plugin/ FieldTypeExport/ LinkExport.php - Massage the field item property value to CSV value.
9 methods override FieldTypeExportBase::massageExportPropertyValue()
- AddressExport::massageExportPropertyValue in src/
Plugin/ FieldTypeExport/ AddressExport.php - Massage the field item property value to CSV value.
- DateRangeExport::massageExportPropertyValue in src/
Plugin/ FieldTypeExport/ DateRangeExport.php - Massage the field item property value to CSV value.
- DateTimeExport::massageExportPropertyValue in src/
Plugin/ FieldTypeExport/ DateTimeExport.php - Massage the field item property value to CSV value.
- EntityReferenceExport::massageExportPropertyValue in src/
Plugin/ FieldTypeExport/ EntityReferenceExport.php - Massage the field item property value to CSV value.
- FileExport::massageExportPropertyValue in src/
Plugin/ FieldTypeExport/ FileExport.php - Massage the field item property value to CSV value.
File
- src/
Plugin/ FieldTypeExportBase.php, line 427
Class
- FieldTypeExportBase
- Base class for Field type export plugins.
Namespace
Drupal\entity_export_csv\PluginCode
public function massageExportPropertyValue(FieldItemInterface $field_item, $property_name, FieldDefinitionInterface $field_definition, $options = []) {
if ($field_item
->isEmpty()) {
return NULL;
}
if (empty($property_name)) {
return NULL;
}
return $field_item
->get($property_name)
->getValue();
}