public function EntityExportCsvDuplicateForm::form in Entity Export CSV 8
Gets the actual form array to be built.
Overrides EntityExportCsvForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
File
- src/
Form/ EntityExportCsvDuplicateForm.php, line 17
Class
- EntityExportCsvDuplicateForm
- Class EntityExportCsvDuplicateForm.
Namespace
Drupal\entity_export_csv\FormCode
public function form(array $form, FormStateInterface $form_state) {
/** @var \Drupal\offcanvas_edit\Entity\OffcanvasEditInterface $entity */
$entity = $this->entity
->createDuplicate();
$entity
->set('label', $this
->t('Duplicate of @label', [
'@label' => $this->entity
->label(),
]));
$this->entity = $entity;
return parent::form($form, $form_state);
}