summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Eskola2017-03-16 06:14:47 (GMT)
committerLauri Eskola2017-03-16 06:14:47 (GMT)
commit6434b391876a5e0ae521ae160d901c53eb6d07b9 (patch)
tree76a4215b7e8a0d3d1f0bad5d94ff34ede7ccb2be
parent16b02ad8fbd560cff72ed05a574a696c0e54d673 (diff)
Issue #2858667 by gaurav.kapoor, dbjpanda: 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.php7
2 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..80c2d38 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);
+ // Build the bulk of the form from the parent form.
+ $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');