You are here

public function MappedObjectForm::__construct in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 5.0.x modules/salesforce_mapping_ui/src/Form/MappedObjectForm.php \Drupal\salesforce_mapping_ui\Form\MappedObjectForm::__construct()

MappedObjectForm constructor.

Parameters

\Drupal\Core\Entity\EntityRepositoryInterface $entityRepository: Entity repository service.

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entityTypeBundleInfo: Bundle info service.

\Drupal\Component\Datetime\TimeInterface $time: Time service.

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

\Symfony\Component\HttpFoundation\RequestStack $request_stack: Request stack.

\Drupal\Core\Entity\EntityTypeManagerInterface $etm: Entity manager service.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

Overrides ContentEntityForm::__construct

File

modules/salesforce_mapping_ui/src/Form/MappedObjectForm.php, line 77

Class

MappedObjectForm
Salesforce Mapping Form base.

Namespace

Drupal\salesforce_mapping_ui\Form

Code

public function __construct(EntityRepositoryInterface $entityRepository, EntityTypeBundleInfoInterface $entityTypeBundleInfo, TimeInterface $time, EventDispatcherInterface $event_dispatcher, RequestStack $request_stack, EntityTypeManagerInterface $etm) {
  parent::__construct($entityRepository, $entityTypeBundleInfo, $time);
  $this->eventDispatcher = $event_dispatcher;
  $this->request = $request_stack
    ->getCurrentRequest();
  $this->entityTypeManager = $etm;
  $this->mappingStorage = $etm
    ->getStorage('salesforce_mapping');
  $this->mappedObjectStorage = $etm
    ->getStorage('salesforce_mapped_object');
}