public function SalesforceExampleSubscriber::pushSuccess in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php \Drupal\salesforce_example\EventSubscriber\SalesforceExampleSubscriber::pushSuccess()
- 8.3 modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php \Drupal\salesforce_example\EventSubscriber\SalesforceExampleSubscriber::pushSuccess()
SalesforcePushParamsEvent push success callback.
Parameters
\Drupal\salesforce_mapping\Event\SalesforcePushParamsEvent $event: The event.
File
- modules/
salesforce_example/ src/ EventSubscriber/ SalesforceExampleSubscriber.php, line 72
Class
- SalesforceExampleSubscriber
- Class SalesforceExampleSubscriber.
Namespace
Drupal\salesforce_example\EventSubscriberCode
public function pushSuccess(SalesforcePushParamsEvent $event) {
switch ($event
->getMappedObject()
->getMapping()
->id()) {
case 'mapping1':
// Do X.
break;
case 'mapping2':
// Do Y.
break;
}
\Drupal::messenger()
->addStatus('push success example subscriber!: ' . $event
->getMappedObject()
->sfid());
}