You are here

protected function WebformAccessGroupForm::prepareEntity in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_access/src/WebformAccessGroupForm.php \Drupal\webform_access\WebformAccessGroupForm::prepareEntity()

Prepares the entity object before the form is built first.

Overrides EntityForm::prepareEntity

File

modules/webform_access/src/WebformAccessGroupForm.php, line 94

Class

WebformAccessGroupForm
Provides a form to define a webform access group.

Namespace

Drupal\webform_access

Code

protected function prepareEntity() {
  if ($this->operation === 'duplicate') {
    $this
      ->setEntity($this
      ->getEntity()
      ->createDuplicate());
  }
  parent::prepareEntity();
}