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