function ContainerForm::buildEntity

Same name in other branches
  1. 8.9.x core/modules/forum/src/Form/ContainerForm.php \Drupal\forum\Form\ContainerForm::buildEntity()
  2. 10 core/modules/forum/src/Form/ContainerForm.php \Drupal\forum\Form\ContainerForm::buildEntity()
  3. 11.x core/modules/forum/src/Form/ContainerForm.php \Drupal\forum\Form\ContainerForm::buildEntity()

Overrides ForumForm::buildEntity

File

core/modules/forum/src/Form/ContainerForm.php, line 41

Class

ContainerForm
Base form for container term edit forms.

Namespace

Drupal\forum\Form

Code

public function buildEntity(array $form, FormStateInterface $form_state) {
    $entity = parent::buildEntity($form, $form_state);
    $entity->forum_container = TRUE;
    return $entity;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.