public function SalesforceMapping::getFieldMapping in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_mapping/src/Entity/SalesforceMapping.php \Drupal\salesforce_mapping\Entity\SalesforceMapping::getFieldMapping()
- 8.3 modules/salesforce_mapping/src/Entity/SalesforceMapping.php \Drupal\salesforce_mapping\Entity\SalesforceMapping::getFieldMapping()
Given a field config, create an instance of a field mapping.
Parameters
array $field: Field plugin definition. Keys are "drupal_field_type" and "config".
Return value
\Drupal\salesforce_mapping\SalesforceMappingFieldPluginInterface The field.
Overrides SalesforceMappingInterface::getFieldMapping
File
- modules/
salesforce_mapping/ src/ Entity/ SalesforceMapping.php, line 492
Class
- SalesforceMapping
- Defines a Salesforce Mapping configuration entity class.
Namespace
Drupal\salesforce_mapping\EntityCode
public function getFieldMapping(array $field) {
return $this
->fieldManager()
->createInstance($field['drupal_field_type'], $field['config'] + [
'mapping' => $this,
]);
}