You are here

public function SalesforceMapping::removePluginDependencies in Salesforce Suite 5.0.x

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

Delegate dependency removal events to field mappings plugins.

Parameters

array $dependencies: Dependencies.

1 call to SalesforceMapping::removePluginDependencies()
SalesforceMapping::onDependencyRemoval in modules/salesforce_mapping/src/Entity/SalesforceMapping.php
Informs the entity that entities it depends on will be deleted.

File

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

Class

SalesforceMapping
Defines a Salesforce Mapping configuration entity class.

Namespace

Drupal\salesforce_mapping\Entity

Code

public function removePluginDependencies(array $dependencies) {
  $changed = FALSE;
  foreach ($this
    ->getFieldMappings() as $i => $field) {
    if ($field
      ->checkFieldMappingDependency($dependencies)) {
      $changed = TRUE;

      // If a plugin is dependent on the configuration being deleted, remove
      // the field mapping.
      unset($this->field_mappings[$i]);
    }
  }
  return $changed;
}