You are here

public function SalesforceMappingStorage::loadPullMappingsByProperties in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 modules/salesforce_mapping/src/SalesforceMappingStorage.php \Drupal\salesforce_mapping\SalesforceMappingStorage::loadPullMappingsByProperties()
  2. 5.0.x modules/salesforce_mapping/src/SalesforceMappingStorage.php \Drupal\salesforce_mapping\SalesforceMappingStorage::loadPullMappingsByProperties()

Return an array push-enabled mappings by properties.

Parameters

array $properties: Properties array for storage handler.

Return value

\Drupal\salesforce_mapping\Entity\SalesforceMappingInterface[] The pull mappings.

See also

::loadByProperties()

1 call to SalesforceMappingStorage::loadPullMappingsByProperties()
SalesforceMappingStorage::loadCronPullMappings in modules/salesforce_mapping/src/SalesforceMappingStorage.php
Get pull Mappings to be processed during cron.

File

modules/salesforce_mapping/src/SalesforceMappingStorage.php, line 113

Class

SalesforceMappingStorage
Class MappedObjectStorage.

Namespace

Drupal\salesforce_mapping

Code

public function loadPullMappingsByProperties(array $properties) {
  $mappings = $this
    ->loadByProperties($properties);
  foreach ($mappings as $key => $mapping) {
    if (!$mapping
      ->doesPull()) {
      continue;
    }
    $push_mappings[$key] = $mapping;
  }
  if (empty($push_mappings)) {
    return [];
  }
  return $push_mappings;
}