protected function WebformSubmissionDuplicateForm::prepareEntity in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformSubmissionDuplicateForm.php \Drupal\webform\WebformSubmissionDuplicateForm::prepareEntity()
Prepares the entity object before the form is built first.
Overrides ContentEntityForm::prepareEntity
File
- src/
WebformSubmissionDuplicateForm.php, line 16
Class
- WebformSubmissionDuplicateForm
- Provides a webform to duplicate existing submissions.
Namespace
Drupal\webformCode
protected function prepareEntity() {
$this
->setEntity($this
->getEntity()
->createDuplicate());
parent::prepareEntity();
}