You are here

class SalesforcePushParamsEvent in Salesforce Suite 8.4

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

Push params event.

Hierarchy

Expanded class hierarchy of SalesforcePushParamsEvent

3 files declare their use of SalesforcePushParamsEvent
MappedObject.php in modules/salesforce_mapping/src/Entity/MappedObject.php
PullBase.php in modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php
SalesforceExampleSubscriber.php in modules/salesforce_example/src/EventSubscriber/SalesforceExampleSubscriber.php

File

modules/salesforce_mapping/src/Event/SalesforcePushParamsEvent.php, line 11

Namespace

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

  /**
   * Push params.
   *
   * @var \Drupal\salesforce_mapping\PushParams
   */
  protected $params;

  /**
   * SalesforcePushParamsEvent constructor.
   *
   * @param \Drupal\salesforce_mapping\Entity\MappedObjectInterface $mapped_object
   *   Mapped object.
   * @param \Drupal\salesforce_mapping\PushParams $params
   *   Push params.
   */
  public function __construct(MappedObjectInterface $mapped_object, PushParams $params) {
    parent::__construct($mapped_object);
    $this->params = $params;
    $this->entity = $params ? $params
      ->getDrupalEntity() : NULL;
    $this->mapping = $params ? $params
      ->getMapping() : NULL;
  }

  /**
   * Getter.
   *
   * @return \Drupal\salesforce_mapping\PushParams
   *   The push param data to be sent to Salesforce.
   */
  public function getParams() {
    return $this->params;
  }

}

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.
SalesforcePushParamsEvent::$params protected property Push params.
SalesforcePushParamsEvent::getParams public function Getter.
SalesforcePushParamsEvent::__construct public function SalesforcePushParamsEvent constructor. Overrides SalesforcePushEvent::__construct