You are here

public function SalesforceMapping::getFieldMappings in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 modules/salesforce_mapping/src/Entity/SalesforceMapping.php \Drupal\salesforce_mapping\Entity\SalesforceMapping::getFieldMappings()
  2. 5.0.x modules/salesforce_mapping/src/Entity/SalesforceMapping.php \Drupal\salesforce_mapping\Entity\SalesforceMapping::getFieldMappings()

Get all the mapped field plugins for this mapping.

Return value

\Drupal\salesforce_mapping\SalesforceMappingFieldPluginInterface[] The fields.

Overrides SalesforceMappingInterface::getFieldMappings

3 calls to SalesforceMapping::getFieldMappings()
SalesforceMapping::calculateDependencies in modules/salesforce_mapping/src/Entity/SalesforceMapping.php
Calculates dependencies and stores them in the dependency property.
SalesforceMapping::getKeyValue in modules/salesforce_mapping/src/Entity/SalesforceMapping.php
Given a Drupal entity, get the value to be upserted.
SalesforceMapping::getPullFields in modules/salesforce_mapping/src/Entity/SalesforceMapping.php
Get all the field plugins which are configured to pull from Salesforce.

File

modules/salesforce_mapping/src/Entity/SalesforceMapping.php, line 415

Class

SalesforceMapping
Defines a Salesforce Mapping configuration entity class.

Namespace

Drupal\salesforce_mapping\Entity

Code

public function getFieldMappings() {

  // @TODO #fieldMappingField
  $fields = [];
  foreach ($this->field_mappings as $field) {
    $fields[] = $this
      ->fieldManager()
      ->createInstance($field['drupal_field_type'], $field);
  }
  return $fields;
}