function ForumController::__construct

Same name in other branches
  1. 9 core/modules/forum/src/Controller/ForumController.php \Drupal\forum\Controller\ForumController::__construct()
  2. 8.9.x core/modules/forum/src/Controller/ForumController.php \Drupal\forum\Controller\ForumController::__construct()
  3. 10 core/modules/forum/src/Controller/ForumController.php \Drupal\forum\Controller\ForumController::__construct()

Constructs a ForumController object.

Parameters

\Drupal\forum\ForumManagerInterface $forum_manager: The forum manager service.

\Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage: Vocabulary storage.

\Drupal\taxonomy\TermStorageInterface $term_storage: Term storage.

\Drupal\Core\Session\AccountInterface $current_user: The current logged in user.

\Drupal\Core\Entity\EntityAccessControlHandlerInterface $node_access: Node access control handler.

array $field_map: Array of active fields on the site.

\Drupal\Core\Entity\EntityStorageInterface $node_type_storage: Node type storage handler.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

\Drupal\Core\Entity\EntityTypeInterface $node_entity_type_definition: Node entity type definition object

\Drupal\Core\Entity\EntityTypeInterface $comment_entity_type_definition: Comment entity type definition object

File

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

Class

ForumController
Controller routines for forum routes.

Namespace

Drupal\forum\Controller

Code

public function __construct(ForumManagerInterface $forum_manager, VocabularyStorageInterface $vocabulary_storage, TermStorageInterface $term_storage, AccountInterface $current_user, EntityAccessControlHandlerInterface $node_access, array $field_map, EntityStorageInterface $node_type_storage, RendererInterface $renderer, EntityTypeInterface $node_entity_type_definition, EntityTypeInterface $comment_entity_type_definition) {
    $this->forumManager = $forum_manager;
    $this->vocabularyStorage = $vocabulary_storage;
    $this->termStorage = $term_storage;
    $this->currentUser = $current_user;
    $this->nodeAccess = $node_access;
    $this->fieldMap = $field_map;
    $this->nodeTypeStorage = $node_type_storage;
    $this->renderer = $renderer;
    $this->nodeEntityTypeDefinition = $node_entity_type_definition;
    $this->commentEntityTypeDefinition = $comment_entity_type_definition;
}

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