ForumController::addForum

public ForumController::addForum()

Returns add forum entity form.

Return value

array Render array for the add form.

File

core/modules/forum/src/Controller/ForumController.php, line 253

Class

ForumController
Controller routines for forum routes.

Namespace

Drupal\forum\Controller

Code

public function addForum() {
  $vid = $this->config('forum.settings')->get('vocabulary');
  $taxonomy_term = $this->termStorage->create(array(
    'vid' => $vid,
    'forum_controller' => 0,
  ));
  return $this->entityFormBuilder()->getForm($taxonomy_term, 'forum');
}
doc_Drupal
2016-10-29 09:17:02
Comments
Leave a Comment

Please login to continue.