public function WebformCardsManager::applyConditions in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_cards/src/WebformCardsManager.php \Drupal\webform_cards\WebformCardsManager::applyConditions()
Update cards pages based on conditional logic (#states).
Parameters
array $pages: An associative array of webform cards.
\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.
Return value
array An associative array of webform cards with conditional logic applied.
Overrides WebformCardsManagerInterface::applyConditions
See also
\Drupal\webform\Entity\Webform::getPages
File
- modules/
webform_cards/ src/ WebformCardsManager.php, line 138
Class
- WebformCardsManager
- Manage webform cards.
Namespace
Drupal\webform_cardsCode
public function applyConditions(array $pages, WebformSubmissionInterface $webform_submission = NULL) {
if ($webform_submission && $webform_submission
->getWebform()
->getSetting('wizard_progress_states')) {
return $this->conditionsValidator
->buildPages($pages, $webform_submission);
}
else {
return $pages;
}
}