File tree Expand file tree Collapse file tree 1 file changed +0
-29
lines changed
templates/d8/module/content-entity/src/Form Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Original file line number Diff line number Diff line change 33namespace Drupal\ {{ machine_name }}\Form ;
44
55use Drupal\Core\Entity\BundleEntityFormBase ;
6- use Drupal\Core\Entity\EntityManagerInterface ;
76use Drupal\Core\Entity\EntityTypeInterface ;
87use Drupal\Core\Form\FormStateInterface ;
9- use Symfony\Component\DependencyInjection\ContainerInterface ;
108
119/**
1210 * Form handler for {{ entity_type_label|lower }} type forms.
1311 */
1412class {{ class_prefix }}TypeForm extends BundleEntityFormBase {
1513
16- /**
17- * The entity manager.
18- *
19- * @var \Drupal\Core\Entity\EntityManagerInterface
20- */
21- protected $entityManager ;
22-
23- /**
24- * Constructs the {{ class_prefix }}TypeForm object.
25- *
26- * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
27- * The entity manager.
28- */
29- public function __construct (EntityManagerInterface $entity_manager ) {
30- $this -> entityManager = $entity_manager ;
31- }
32-
33- /**
34- * {@inheritdoc}
35- */
36- public static function create (ContainerInterface $container ) {
37- return new static (
38- $container -> get(' entity.manager' )
39- );
40- }
41-
4214 /**
4315 * {@inheritdoc}
4416 */
@@ -109,7 +81,6 @@ class {{ class_prefix }}TypeForm extends BundleEntityFormBase {
10981 }
11082 $this -> messenger()-> addStatus($message );
11183
112- $this -> entityManager -> clearCachedFieldDefinitions();
11384 $form_state -> setRedirectUrl($entity_type -> toUrl(' collection' ));
11485 }
11586
You can’t perform that action at this time.
0 commit comments