You are here

interface YamlFormSubmissionGenerateInterface in YAML Form 8

Defines an interface for form submission generation.

Hierarchy

Expanded class hierarchy of YamlFormSubmissionGenerateInterface

All classes that implement YamlFormSubmissionGenerateInterface

See also

\Drupal\yamlform\YamlFormSubmissionGenerate

\Drupal\yamlform\Plugin\DevelGenerate\YamlFormSubmissionDevelGenerate

2 files declare their use of YamlFormSubmissionGenerateInterface
YamlFormSubmissionDevelGenerate.php in src/Plugin/DevelGenerate/YamlFormSubmissionDevelGenerate.php
YamlFormTestController.php in src/Controller/YamlFormTestController.php

File

src/YamlFormSubmissionGenerateInterface.php, line 11

Namespace

Drupal\yamlform
View source
interface YamlFormSubmissionGenerateInterface {

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

  /**
   * Get test value for a form element.
   *
   * @param \Drupal\yamlform\YamlFormInterface $yamlform
   *   A form.
   * @param string $name
   *   The name of the element.
   * @param array $element
   *   The FAPI element.
   *
   * @return array|int|null
   *   An array containing multiple values or a single value.
   */
  public function getTestValue(YamlFormInterface $yamlform, $name, array $element);

}

Members

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