diff --git a/core/modules/forum/src/Form/ContainerForm.php b/core/modules/forum/src/Form/ContainerForm.php index d12d0982a340a8f627b41d7dd2cf42266ca944f7..0b011245743192d2bc99a61ff37a599cf8a6255a 100644 --- a/core/modules/forum/src/Form/ContainerForm.php +++ b/core/modules/forum/src/Form/ContainerForm.php @@ -20,9 +20,8 @@ class ContainerForm extends ForumForm { * {@inheritdoc} */ public function form(array $form, FormStateInterface $form_state) { - $taxonomy_term = $this->entity; // Build the bulk of the form from the parent forum form. - $form = parent::form($form, $form_state, $taxonomy_term); + $form = parent::form($form, $form_state); // Set the title and description of the name field. $form['name']['#title'] = $this->t('Container name'); diff --git a/core/modules/forum/src/Form/ForumForm.php b/core/modules/forum/src/Form/ForumForm.php index ed0a7683a5d389bfe21a96c38230f8c2388326f7..9e5895d0dbe60c0ae709c291a96b7f6613ebaf3f 100644 --- a/core/modules/forum/src/Form/ForumForm.php +++ b/core/modules/forum/src/Form/ForumForm.php @@ -29,9 +29,8 @@ class ForumForm extends TermForm { * {@inheritdoc} */ public function form(array $form, FormStateInterface $form_state) { - $taxonomy_term = $this->entity; // Build the bulk of the form from the parent taxonomy term form. - $form = parent::form($form, $form_state, $taxonomy_term); + $form = parent::form($form, $form_state); // Set the title and description of the name field. $form['name']['#title'] = $this->t('Forum name'); @@ -48,7 +47,7 @@ public function form(array $form, FormStateInterface $form_state) { // Our parent field is different to the taxonomy term. $form['parent']['#tree'] = TRUE; - $form['parent'][0] = $this->forumParentSelect($taxonomy_term->id(), $this->t('Parent')); + $form['parent'][0] = $this->forumParentSelect($this->entity->id(), $this->t('Parent')); $form['#theme_wrappers'] = ['form__forum']; $this->forumFormType = $this->t('forum'); diff --git a/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php index 6e307ca35a0156b6e71b14ce7162935e5033e6de..1eae95a0d4f3bfcd32440d1c505b74732a93c981 100644 --- a/core/modules/taxonomy/src/TermForm.php +++ b/core/modules/taxonomy/src/TermForm.php @@ -85,7 +85,7 @@ public function form(array $form, FormStateInterface $form_state) { '#value' => $term->id(), ]; - return parent::form($form, $form_state, $term); + return parent::form($form, $form_state); } /**