ForumController::addContainer

public ForumController::addContainer()

Returns add container entity form.

Return value

array Render array for the add form.

File

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

Class

ForumController
Controller routines for forum routes.

Namespace

Drupal\forum\Controller

Code

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

Please login to continue.