You are here

class SalesforcePushOpEvent in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 modules/salesforce_mapping/src/Event/SalesforcePushOpEvent.php \Drupal\salesforce_mapping\Event\SalesforcePushOpEvent
  2. 5.0.x modules/salesforce_mapping/src/Event/SalesforcePushOpEvent.php \Drupal\salesforce_mapping\Event\SalesforcePushOpEvent

Push op event.

Hierarchy

Expanded class hierarchy of SalesforcePushOpEvent

3 files declare their use of SalesforcePushOpEvent
Rest.php in modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
SalesforceExampleSubscriber.php in modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php
salesforce_push.module in modules/salesforce_push/salesforce_push.module
Push updates to Salesforce when a Drupal entity is updated.

File

modules/salesforce_mapping/src/Event/SalesforcePushOpEvent.php, line 10

Namespace

Drupal\salesforce_mapping\Event
View source
class SalesforcePushOpEvent extends SalesforcePushEvent {

  /**
   * The pull operation.
   *
   * One of:
   * \Drupal\salesforce_mapping\MappingConstants::SALESFORCE_MAPPING_SYNC_SF_CREATE
   * \Drupal\salesforce_mapping\MappingConstants::SALESFORCE_MAPPING_SYNC_SF_UPDATE
   * \Drupal\salesforce_mapping\MappingConstants::SALESFORCE_MAPPING_SYNC_SF_DELETE.
   *
   * @var string
   */
  protected $op;

  /**
   * SalesforcePushOpEvent dispatched when PushParams are not available.
   *
   * @param \Drupal\salesforce_mapping\Entity\MappedObjectInterface $mapped_object
   *   The mapped object.
   * @param string $op
   *   One of
   *     Drupal\salesforce_mapping\MappingConstants::
   *       SALESFORCE_MAPPING_SYNC_DRUPAL_CREATE
   *       SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE
   *       SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE.
   */
  public function __construct(MappedObjectInterface $mapped_object, $op) {
    parent::__construct($mapped_object);
    $this->op = $op;
  }

  /**
   * Getter for the pull operation.
   *
   * One of:
   * \Drupal\salesforce_mapping\MappingConstants::SALESFORCE_MAPPING_SYNC_SF_CREATE
   * \Drupal\salesforce_mapping\MappingConstants::SALESFORCE_MAPPING_SYNC_SF_UPDATE
   * \Drupal\salesforce_mapping\MappingConstants::SALESFORCE_MAPPING_SYNC_SF_DELETE.
   *
   * @var string
   *   The op.
   */
  public function getOp() {
    return $this->op;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SalesforcePushEvent::$entity protected property The Drupal entity.
SalesforcePushEvent::$mappedObject protected property The mapped object.
SalesforcePushEvent::$mapping protected property The mapping.
SalesforcePushEvent::getEntity public function Getter.
SalesforcePushEvent::getMappedObject public function Getter.
SalesforcePushEvent::getMapping public function Getter.
SalesforcePushOpEvent::$op protected property The pull operation.
SalesforcePushOpEvent::getOp public function Getter for the pull operation.
SalesforcePushOpEvent::__construct public function SalesforcePushOpEvent dispatched when PushParams are not available. Overrides SalesforcePushEvent::__construct 1