public function TestWebformVariant::applyVariant in Webform 8.5
Same name and namespace in other branches
- 6.x tests/modules/webform_test_variant/src/Plugin/WebformVariant/TestWebformVariant.php \Drupal\webform_test_variant\Plugin\WebformVariant\TestWebformVariant::applyVariant()
Apply variant to the webform.
Return value
bool TRUE if this variant was applied to the webform.
Overrides WebformVariantBase::applyVariant
File
- tests/
modules/ webform_test_variant/ src/ Plugin/ WebformVariant/ TestWebformVariant.php, line 71
Class
- TestWebformVariant
- Webform example variant.
Namespace
Drupal\webform_test_variant\Plugin\WebformVariantCode
public function applyVariant() {
$webform = $this
->getWebform();
if (!$this
->isApplicable($webform)) {
return FALSE;
}
// Debug.
$this
->debug();
return TRUE;
}