You are here

public function SalesforcePushParamsEvent::__construct in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 modules/salesforce_mapping/src/Event/SalesforcePushParamsEvent.php \Drupal\salesforce_mapping\Event\SalesforcePushParamsEvent::__construct()
  2. 5.0.x modules/salesforce_mapping/src/Event/SalesforcePushParamsEvent.php \Drupal\salesforce_mapping\Event\SalesforcePushParamsEvent::__construct()

SalesforcePushParamsEvent constructor.

Parameters

\Drupal\salesforce_mapping\Entity\MappedObjectInterface $mapped_object: Mapped object.

\Drupal\salesforce_mapping\PushParams $params: Push params.

Overrides SalesforcePushEvent::__construct

File

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

Class

SalesforcePushParamsEvent
Push params event.

Namespace

Drupal\salesforce_mapping\Event

Code

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;
}