You are here

interface WebformSubmissionGenerateInterface in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionGenerateInterface.php \Drupal\webform\WebformSubmissionGenerateInterface

Defines an interface for webform submission generation.

Hierarchy

Expanded class hierarchy of WebformSubmissionGenerateInterface

All classes that implement WebformSubmissionGenerateInterface

See also

\Drupal\webform\WebformSubmissionGenerate

\Drupal\webform\Plugin\DevelGenerate\WebformSubmissionDevelGenerate

4 files declare their use of WebformSubmissionGenerateInterface
WebformDevelSubmissionApiForm.php in modules/webform_devel/src/Form/WebformDevelSubmissionApiForm.php
WebformSubmissionDevelGenerateTrait.php in src/Plugin/DevelGenerate/WebformSubmissionDevelGenerateTrait.php
WebformSubmissionExportImportController.php in modules/webform_submission_export_import/src/Controller/WebformSubmissionExportImportController.php
WebformTestController.php in src/Controller/WebformTestController.php

File

src/WebformSubmissionGenerateInterface.php, line 11

Namespace

Drupal\webform
View source
interface WebformSubmissionGenerateInterface {

  /**
   * Generate webform submission data.
   *
   * @param \Drupal\webform\WebformInterface $webform
   *   The webform this submission will be added to.
   *
   * @return array
   *   An associative array containing webform submission data.
   */
  public function getData(WebformInterface $webform);

  /**
   * Get test value for a webform element.
   *
   * @param \Drupal\webform\WebformInterface $webform
   *   A webform.
   * @param string $name
   *   The name of the element.
   * @param array $element
   *   The FAPI element.
   * @param array $options
   *   Options used to generate a test value.
   *
   * @return array|int|null
   *   An array containing multiple values or a single value.
   */
  public function getTestValue(WebformInterface $webform, $name, array $element, array $options = []);

}

Members

Namesort descending Modifiers Type Description Overrides
WebformSubmissionGenerateInterface::getData public function Generate webform submission data. 1
WebformSubmissionGenerateInterface::getTestValue public function Get test value for a webform element. 1