summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Eskola2017-03-18 14:05:43 (GMT)
committerLauri Eskola2017-03-18 14:05:43 (GMT)
commit260b8234acc9656af9756a29fa9f5dceea6ea2b1 (patch)
treee1ffb914654ff62d75f2b2617149905a4951da3d
parentfa8889e0e8cd2adaef0c21c733d17394dd7752b5 (diff)
Issue #2858667 by gaurav.kapoor, dbjpanda, klausi: Extra arguments sent to a function
-rw-r--r--core/modules/forum/src/Form/ContainerForm.php3
-rw-r--r--core/modules/forum/src/Form/ForumForm.php5
-rw-r--r--core/modules/taxonomy/src/TermForm.php2
3 files changed, 4 insertions, 6 deletions
diff --git a/core/modules/forum/src/Form/ContainerForm.php b/core/modules/forum/src/Form/ContainerForm.php
index d12d098..0b01124 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 ed0a768..9e5895d 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 @@ class ForumForm extends TermForm {
// 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 6e307ca..1eae95a 100644
--- a/core/modules/taxonomy/src/TermForm.php
+++ b/core/modules/taxonomy/src/TermForm.php
@@ -85,7 +85,7 @@ class TermForm extends ContentEntityForm {
'#value' => $term->id(),
];
- return parent::form($form, $form_state, $term);
+ return parent::form($form, $form_state);
}
/**