You are here

public function QueueHandler::enqueueRecord in Salesforce Suite 5.0.x

Same name and namespace in other branches
  1. 8.4 modules/salesforce_pull/src/QueueHandler.php \Drupal\salesforce_pull\QueueHandler::enqueueRecord()
  2. 8.3 modules/salesforce_pull/src/QueueHandler.php \Drupal\salesforce_pull\QueueHandler::enqueueRecord()

Enqueue a single record for pull.

Parameters

\Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping: Mapping.

\Drupal\salesforce\SObject $record: Salesforce data.

bool $force_pull: If TRUE, ignore timestamps and force data to be pulled.

Throws

\Exception

1 call to QueueHandler::enqueueRecord()
QueueHandler::enqueueResultSet in modules/salesforce_pull/src/QueueHandler.php
Enqueue a set of results into pull queue.

File

modules/salesforce_pull/src/QueueHandler.php, line 317

Class

QueueHandler
Handles pull cron queue set up.

Namespace

Drupal\salesforce_pull

Code

public function enqueueRecord(SalesforceMappingInterface $mapping, SObject $record, $force_pull = FALSE) {
  $this->queue
    ->createItem(new PullQueueItem($record, $mapping, $force_pull));
}