protected function WebformOptionsForm::prepareEntity in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformOptionsForm.php \Drupal\webform\WebformOptionsForm::prepareEntity()
Prepares the entity object before the form is built first.
Overrides EntityForm::prepareEntity
File
- src/
WebformOptionsForm.php, line 39
Class
- WebformOptionsForm
- Provides a form to set options.
Namespace
Drupal\webformCode
protected function prepareEntity() {
if ($this->operation === 'duplicate') {
$this
->setEntity($this
->getEntity()
->createDuplicate());
}
parent::prepareEntity();
}