You are here

public function WebformSubmissionValue::getWebform in Pardot Integration 2.x

Get Webform.

Return value

null|\Drupal\webform\Entity\Webform Return the webform object.

2 calls to WebformSubmissionValue::getWebform()
WebformSubmissionValue::buildConfigurationForm in src/Plugin/PardotFormMapFormatterPlugin/WebformSubmissionValue.php
WebformSubmissionValue::getWebformElements in src/Plugin/PardotFormMapFormatterPlugin/WebformSubmissionValue.php
Get the list of elements.

File

src/Plugin/PardotFormMapFormatterPlugin/WebformSubmissionValue.php, line 222

Class

WebformSubmissionValue
Plugin to generate a text field and consume tokens for mappings.

Namespace

Drupal\pardot\Plugin\PardotFormMapFormatterPlugin

Code

public function getWebform() {
  $entity_id = explode(':', $this->configuration['entity_id'])[1] ?? '';

  /** @var \Drupal\webform\Entity\Webform $webform */
  return $this->entityTypeManager
    ->getStorage('webform')
    ->load($entity_id);
}