You are here

interface WebformSubmissionGenerateInterface in Webform 6.x

Same name and namespace in other branches
  1. 8.5 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

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