interface WebformSubmissionConditionsValidatorInterface in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformSubmissionConditionsValidatorInterface.php \Drupal\webform\WebformSubmissionConditionsValidatorInterface
Provides an interface defining a webform conditions (#states) validator.
Hierarchy
- interface \Drupal\webform\WebformSubmissionConditionsValidatorInterface
Expanded class hierarchy of WebformSubmissionConditionsValidatorInterface
All classes that implement WebformSubmissionConditionsValidatorInterface
2 files declare their use of WebformSubmissionConditionsValidatorInterface
- DebugWebformHandler.php in src/
Plugin/ WebformHandler/ DebugWebformHandler.php - WebformCardsManager.php in modules/
webform_cards/ src/ WebformCardsManager.php
File
- src/
WebformSubmissionConditionsValidatorInterface.php, line 10
Namespace
Drupal\webformView source
interface WebformSubmissionConditionsValidatorInterface {
/**
* Apply states (aka conditional logic) to wizard pages.
*
* @param array $pages
* An associative array of webform wizard pages.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return array
* An associative array of webform wizard pages with hidden pages removed.
*/
public function buildPages(array $pages, WebformSubmissionInterface $webform_submission);
/**
* Apply form #states to visible elements.
*
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @see \Drupal\webform\WebformSubmissionForm::buildForm
*/
public function buildForm(array &$form, FormStateInterface $form_state);
/**
* Validate form #states for visible elements.
*
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @see \Drupal\webform\WebformSubmissionForm::validateForm
*/
public function validateForm(array &$form, FormStateInterface $form_state);
/**
* Submit form #states for visible elements.
*
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @see \Drupal\webform\WebformSubmissionForm::submitForm
*/
public function submitForm(array &$form, FormStateInterface $form_state);
/**
* Validate state with conditions.
*
* @param string $state
* A state.
* @param array $conditions
* An associative array containing conditions.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return bool|null
* TRUE if conditions validate. NULL if conditions can't be processed.
*/
public function validateState($state, array $conditions, WebformSubmissionInterface $webform_submission);
/**
* Validate #state conditions.
*
* @param array $conditions
* An associative array containing conditions.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return bool|null
* TRUE if the conditions validate. NULL if the conditions can't be
* processed. NULL is returned when there is an invalid selector or a
* missing element in the conditions.
*
* @see \Drupal\Core\Form\FormHelper::processStates
*/
public function validateConditions(array $conditions, WebformSubmissionInterface $webform_submission);
/**
* Determine if an element is visible.
*
* @param array $element
* An element.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return bool
* TRUE if the element is visible.
*/
public function isElementVisible(array $element, WebformSubmissionInterface $webform_submission);
/**
* Determine if an element is enabled.
*
* @param array $element
* An element.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return bool
* TRUE if the element is enabled.
*/
public function isElementEnabled(array $element, WebformSubmissionInterface $webform_submission);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WebformSubmissionConditionsValidatorInterface:: |
public | function | Apply form #states to visible elements. | 1 |
WebformSubmissionConditionsValidatorInterface:: |
public | function | Apply states (aka conditional logic) to wizard pages. | 1 |
WebformSubmissionConditionsValidatorInterface:: |
public | function | Determine if an element is enabled. | 1 |
WebformSubmissionConditionsValidatorInterface:: |
public | function | Determine if an element is visible. | 1 |
WebformSubmissionConditionsValidatorInterface:: |
public | function | Submit form #states for visible elements. | 1 |
WebformSubmissionConditionsValidatorInterface:: |
public | function | Validate #state conditions. | 1 |
WebformSubmissionConditionsValidatorInterface:: |
public | function | Validate form #states for visible elements. | 1 |
WebformSubmissionConditionsValidatorInterface:: |
public | function | Validate state with conditions. | 1 |