You are here

abstract class SalesforcePushEvent in Salesforce Suite 8.4

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

Push event.

Hierarchy

Expanded class hierarchy of SalesforcePushEvent

File

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

Namespace

Drupal\salesforce_mapping\Event
View source
abstract class SalesforcePushEvent extends SalesforceBaseEvent {

  /**
   * The mapping.
   *
   * @var \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface
   */
  protected $mapping;

  /**
   * The mapped object.
   *
   * @var \Drupal\salesforce_mapping\Entity\MappedObjectInterface
   */
  protected $mappedObject;

  /**
   * The Drupal entity.
   *
   * @var \Drupal\Core\Entity\FieldableEntityInterface
   */
  protected $entity;

  /**
   * SalesforcePushEvent constructor.
   *
   * @param \Drupal\salesforce_mapping\Entity\MappedObjectInterface $mappedObject
   *   The mapped object.
   */
  public function __construct(MappedObjectInterface $mappedObject) {
    $this->mappedObject = $mappedObject;
    $this->entity = $mappedObject ? $mappedObject
      ->getMappedEntity() : NULL;
    $this->mapping = $mappedObject ? $mappedObject
      ->getMapping() : NULL;
  }

  /**
   * Getter.
   *
   * @return \Drupal\Core\Entity\FieldableEntityInterface
   *   The entity.
   */
  public function getEntity() {
    return $this->entity;
  }

  /**
   * Getter.
   *
   * @return \Drupal\salesforce_mapping\Entity\SalesforceMappingInterface
   *   The mapping.
   */
  public function getMapping() {
    return $this->mapping;
  }

  /**
   * Getter.
   *
   * @return \Drupal\salesforce_mapping\Entity\MappedObjectInterface
   *   The mapped object.
   */
  public function getMappedObject() {
    return $this->mappedObject;
  }

}

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.
SalesforcePushEvent::__construct public function SalesforcePushEvent constructor. 2