public function SalesforceMappingFieldPluginInterface::pullValue in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_mapping/src/SalesforceMappingFieldPluginInterface.php \Drupal\salesforce_mapping\SalesforceMappingFieldPluginInterface::pullValue()
- 8.3 modules/salesforce_mapping/src/SalesforceMappingFieldPluginInterface.php \Drupal\salesforce_mapping\SalesforceMappingFieldPluginInterface::pullValue()
Pull callback for field plugins.
This callback is overloaded to serve 2 different use cases.
- Use case 1: primitive values If pullValue() returns a primitive value, callers will attempt to set the value directly on the parent entity.
- Use case 2: typed data If pullValue() returns a TypedDataInterface, callers will assume the implementation has set the appropriate value(s). The returned TypedData will be issued to a SalesforceEvents::PULL_ENTITY_VALUE event, but will otherwise be ignored.
Parameters
\Drupal\salesforce\SObject $sf_object: The SFObject being pulled.
\Drupal\Core\Entity\EntityInterface $entity: The entity being pulled.
\Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping: The mapping.
Return value
\Drupal\Core\TypedData\TypedDataInterface|mixed If a TypedDataInterface is returned, validate constraints and use TypedDataManager to set the value on the root entity. Otherwise, set the value directly via FieldableEntityInterface::set
1 method overrides SalesforceMappingFieldPluginInterface::pullValue()
- SalesforceMappingFieldPluginBase::pullValue in modules/
salesforce_mapping/ src/ SalesforceMappingFieldPluginBase.php - Pull callback for field plugins.
File
- modules/
salesforce_mapping/ src/ SalesforceMappingFieldPluginInterface.php, line 100
Class
- SalesforceMappingFieldPluginInterface
- Defines an interface for salesforce mapping plugins.
Namespace
Drupal\salesforce_mappingCode
public function pullValue(SObject $sf_object, EntityInterface $entity, SalesforceMappingInterface $mapping);