public function YamlFormTest::postSave in YAML Form 8
Acts on a saved form submission element before the insert or update hook is invoked.
Parameters
array $element: An element.
\Drupal\yamlform\YamlFormSubmissionInterface $yamlform_submission: A form submission.
bool $update: TRUE if the entity has been updated, or FALSE if it has been inserted.
Overrides YamlFormElementBase::postSave
File
- tests/
modules/ yamlform_test/ src/ Plugin/ YamlFormElement/ YamlFormTest.php, line 103
Class
- YamlFormTest
- Provides a 'yamlform_test' element.
Namespace
Drupal\yamlform_test\Plugin\YamlFormElementCode
public function postSave(array &$element, YamlFormSubmissionInterface $yamlform_submission, $update = TRUE) {
$this
->displayMessage(__FUNCTION__, $update ? 'update' : 'insert');
}