Commit e43a961e authored by lauriii's avatar lauriii

Revert "Issue #2858667 by gaurav.kapoor, dbjpanda: Extra arguments sent to a function"

This reverts commit 6434b391.
parent 6434b391
......@@ -20,8 +20,9 @@ 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);
$form = parent::form($form, $form_state, $taxonomy_term);
// Set the title and description of the name field.
$form['name']['#title'] = $this->t('Container name');
......
......@@ -29,8 +29,9 @@ class ForumForm extends TermForm {
* {@inheritdoc}
*/
public function form(array $form, FormStateInterface $form_state) {
// Build the bulk of the form from the parent form.
$form = parent::form($form, $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);
// Set the title and description of the name field.
$form['name']['#title'] = $this->t('Forum name');
......@@ -47,7 +48,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($this->entity->id(), $this->t('Parent'));
$form['parent'][0] = $this->forumParentSelect($taxonomy_term->id(), $this->t('Parent'));
$form['#theme_wrappers'] = ['form__forum'];
$this->forumFormType = $this->t('forum');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment