forumParentSelect example

// Change the description.     $form['description']['#description'] = $this->t('Description and guidelines for discussions within this forum.');

    // Re-use the weight field.     $form['weight'] = $form['relations']['weight'];

    // Remove the remaining relations fields.     unset($form['relations']);

    // 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['#theme_wrappers'] = ['form__forum'];
    $this->forumFormType = $this->t('forum');
    return $form;
  }

  /** * {@inheritdoc} */
  public function buildEntity(array $form, FormStateInterface $form_state) {
    $term = parent::buildEntity($form$form_state);

    
Home | Imprint | This part of the site doesn't use cookies.