You are here

salesforce_pull.module in Salesforce Suite 8.3

Pull updates from Salesforce when a Salesforce object is updated.

File

modules/salesforce_pull/salesforce_pull.module
View source
<?php

/**
 * @file
 * Pull updates from Salesforce when a Salesforce object is updated.
 */

/**
 * Implements hook_cron().
 */
function salesforce_pull_cron() {
  if (\Drupal::config('salesforce.settings')
    ->get('standalone')) {

    // If global standalone processing is enabled, stop here.
    return;
  }
  $sfapi = \Drupal::service('salesforce.client');
  if ($sfapi
    ->isAuthorized()) {
    \Drupal::service('salesforce_pull.queue_handler')
      ->getUpdatedRecords();
    \Drupal::service('salesforce_pull.delete_handler')
      ->processDeletedRecords();
  }
}

Functions

Namesort descending Description
salesforce_pull_cron Implements hook_cron().