public function SalesforceMappingStorage::loadPullMappings in Salesforce Suite 8.3
Same name and namespace in other branches
- 8.4 modules/salesforce_mapping/src/SalesforceMappingStorage.php \Drupal\salesforce_mapping\SalesforceMappingStorage::loadPullMappings()
- 5.0.x modules/salesforce_mapping/src/SalesforceMappingStorage.php \Drupal\salesforce_mapping\SalesforceMappingStorage::loadPullMappings()
Return an array of SalesforceMapping entities who are pull-enabled.
Parameters
string $entity_type_id: Optionally filter by entity type id.
Return value
\Drupal\salesforce_mapping\Entity\SalesforceMappingInterface[] The Mappings.
File
- modules/
salesforce_mapping/ src/ SalesforceMappingStorage.php, line 191
Class
- SalesforceMappingStorage
- Class MappedObjectStorage.
Namespace
Drupal\salesforce_mappingCode
public function loadPullMappings($entity_type_id = NULL) {
$pull_mappings = [];
$properties = empty($entity_type_id) ? [] : [
"drupal_entity_type" => $entity_type_id,
];
$mappings = $this
->loadByProperties($properties);
foreach ($mappings as $key => $mapping) {
if (!$mapping
->doesPull()) {
continue;
}
$pull_mappings[$key] = $mapping;
}
if (empty($pull_mappings)) {
return [];
}
return $pull_mappings;
}