JsInjectorDuplicateForm.php in Asset Injector 8
File
src/Form/JsInjectorDuplicateForm.php
View source
<?php
namespace Drupal\asset_injector\Form;
use Drupal\Core\Form\FormStateInterface;
class JsInjectorDuplicateForm extends JsInjectorForm {
public function form(array $form, FormStateInterface $form_state) {
$entity = $this->entity
->createDuplicate();
$entity->label = $this
->t('Duplicate of @label', [
'@label' => $this->entity
->label(),
]);
$this->entity = $entity;
return parent::form($form, $form_state);
}
}