public function ForumController::addForum in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/forum/src/Controller/ForumController.php \Drupal\forum\Controller\ForumController::addForum()
Returns add forum entity form.
Return value
array Render array for the add form.
1 string reference to 'ForumController::addForum'
- forum.routing.yml in core/
modules/ forum/ forum.routing.yml - core/modules/forum/forum.routing.yml
File
- core/
modules/ forum/ src/ Controller/ ForumController.php, line 258 - Contains \Drupal\forum\Controller\ForumController.
Class
- ForumController
- Controller routines for forum routes.
Namespace
Drupal\forum\ControllerCode
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');
}