You are here

public function PushController::mappingEndpoint in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 modules/salesforce_push/src/PushController.php \Drupal\salesforce_push\PushController::mappingEndpoint()
  2. 5.0.x modules/salesforce_push/src/PushController.php \Drupal\salesforce_push\PushController::mappingEndpoint()

Page callback to process push queue for a given mapping.

1 string reference to 'PushController::mappingEndpoint'
salesforce_push.routing.yml in modules/salesforce_push/salesforce_push.routing.yml
modules/salesforce_push/salesforce_push.routing.yml

File

modules/salesforce_push/src/PushController.php, line 71

Class

PushController
Push controller.

Namespace

Drupal\salesforce_push

Code

public function mappingEndpoint($salesforce_mapping) {
  $mapping = $this->mappingStorage
    ->load($salesforce_mapping);

  // If standalone for this mapping is disabled, and global standalone is
  // disabled, then "Access Denied" for this mapping.
  if (!$mapping
    ->doesPushStandalone() && !\Drupal::config('salesforce.settings')
    ->get('standalone')) {
    throw new AccessDeniedHttpException();
  }
  $this->pushQueue
    ->processQueue($mapping);
  return new Response('', 204);
}