public function RelatedProperties::checkFieldMappingDependency in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_mapping/src/Plugin/SalesforceMappingField/RelatedProperties.php \Drupal\salesforce_mapping\Plugin\SalesforceMappingField\RelatedProperties::checkFieldMappingDependency()
On dependency removal, determine if this plugin needs to be removed.
Parameters
array $dependencies: Dependencies, as provided to ConfigEntityInterface::onDependencyRemoval.
Return value
bool TRUE if the field should be removed, otherwise false.
Overrides SalesforceMappingFieldPluginBase::checkFieldMappingDependency
File
- modules/
salesforce_mapping/ src/ Plugin/ SalesforceMappingField/ RelatedProperties.php, line 124
Class
- RelatedProperties
- Adapter for entity Reference and fields.
Namespace
Drupal\salesforce_mapping\Plugin\SalesforceMappingFieldCode
public function checkFieldMappingDependency(array $dependencies) {
$definition = $this
->getPluginDefinition();
foreach ($definition['config_dependencies'] as $type => $dependency) {
foreach ($dependency as $item) {
if (!empty($dependencies[$type][$item])) {
return TRUE;
}
}
}
}