You are here

public function PullBase::__construct in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php \Drupal\salesforce_pull\Plugin\QueueWorker\PullBase::__construct()
  2. 5.0.x modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php \Drupal\salesforce_pull\Plugin\QueueWorker\PullBase::__construct()

Creates a new PullBase object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\salesforce\Rest\RestClientInterface $client: Salesforce REST client.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: Event dispatcher service.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

Overrides PluginBase::__construct

File

modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php, line 77

Class

PullBase
Provides base functionality for the Salesforce Pull Queue Workers.

Namespace

Drupal\salesforce_pull\Plugin\QueueWorker

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, RestClientInterface $client, EventDispatcherInterface $event_dispatcher) {
  $this->etm = $entity_type_manager;
  $this->client = $client;
  $this->eventDispatcher = $event_dispatcher;
  $this->mappingStorage = $this->etm
    ->getStorage('salesforce_mapping');
  $this->mappedObjectStorage = $this->etm
    ->getStorage('salesforce_mapped_object');
}