protected function SalesforceMappingFieldPluginBase::instanceOfEntityReference in Salesforce Suite 8.3
Same name and namespace in other branches
- 8.4 modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php \Drupal\salesforce_mapping\SalesforceMappingFieldPluginBase::instanceOfEntityReference()
- 5.0.x modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php \Drupal\salesforce_mapping\SalesforceMappingFieldPluginBase::instanceOfEntityReference()
Return TRUE if the given field uses an entity reference handler.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $instance: The field.
Return value
bool Whether the field is an entity reference.
3 calls to SalesforceMappingFieldPluginBase::instanceOfEntityReference()
- Properties::getConfigurationOptions in modules/
salesforce_mapping/ src/ Plugin/ SalesforceMappingField/ Properties.php - Form options helper.
- RelatedIDs::getConfigurationOptions in modules/
salesforce_mapping/ src/ Plugin/ SalesforceMappingField/ RelatedIDs.php - Helper to build form options.
- RelatedProperties::getConfigurationOptions in modules/
salesforce_mapping/ src/ Plugin/ SalesforceMappingField/ RelatedProperties.php - Form options helper.
File
- modules/
salesforce_mapping/ src/ SalesforceMappingFieldPluginBase.php, line 536
Class
- SalesforceMappingFieldPluginBase
- Defines a base Salesforce Mapping Field Plugin implementation.
Namespace
Drupal\salesforce_mappingCode
protected function instanceOfEntityReference(FieldDefinitionInterface $instance) {
$handler = $instance
->getSetting('handler');
// We must have a handler.
if (empty($handler)) {
return FALSE;
}
// If the handler is a selection interface, return TRUE.
$plugin = $this
->selectionPluginManager()
->getSelectionHandler($instance);
return $plugin instanceof SelectionInterface;
}