You are here

public function SalesforceDeleteAllowedEvent::__construct in Salesforce Suite 5.0.x

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

SalesforceDeleteAllowedEvent dispatched before deleting an entity.

Parameters

\Drupal\salesforce_mapping\Entity\MappedObjectInterface $mapped_object: The mapped object.

File

modules/salesforce_mapping/src/Event/SalesforceDeleteAllowedEvent.php, line 40

Class

SalesforceDeleteAllowedEvent
Delete allowed event.

Namespace

Drupal\salesforce_mapping\Event

Code

public function __construct(MappedObjectInterface $mapped_object) {
  $this->mappedObject = $mapped_object;
  $this->entity = $mapped_object ? $mapped_object
    ->getMappedEntity() : NULL;
  $this->mapping = $mapped_object ? $mapped_object
    ->getMapping() : NULL;
}