protected function PropertiesExtended::getDrupalFieldType in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 modules/salesforce_mapping/src/Plugin/SalesforceMappingField/PropertiesExtended.php \Drupal\salesforce_mapping\Plugin\SalesforceMappingField\PropertiesExtended::getDrupalFieldType()
- 5.0.x modules/salesforce_mapping/src/Plugin/SalesforceMappingField/PropertiesExtended.php \Drupal\salesforce_mapping\Plugin\SalesforceMappingField\PropertiesExtended::getDrupalFieldType()
Helper method to get the Field Type of the given Field Data Definition.
Parameters
\Drupal\Core\TypedData\DataDefinitionInterface $data_definition: The Drupal Field Data Definition object.
Return value
string|null The Drupal Field Type or NULL.
Overrides PropertiesBase::getDrupalFieldType
File
- modules/
salesforce_mapping/ src/ Plugin/ SalesforceMappingField/ PropertiesExtended.php, line 111
Class
- PropertiesExtended
- Adapter for entity properties and fields.
Namespace
Drupal\salesforce_mapping\Plugin\SalesforceMappingFieldCode
protected function getDrupalFieldType(DataDefinitionInterface $data_definition) {
$field_main_property = $data_definition;
if ($data_definition instanceof ComplexDataDefinitionInterface) {
$field_main_property = $data_definition
->getPropertyDefinition($data_definition
->getMainPropertyName());
}
return $field_main_property ? $field_main_property
->getDataType() : NULL;
}