Drupal 8  8.0.2
ForumController Class Reference
Inheritance diagram for ForumController:

Public Member Functions

 __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)
 
 forumPage (TermInterface $taxonomy_term)
 
 forumIndex ()
 
 addForum ()
 
 addContainer ()
 

Protected Member Functions

 build ($forums, TermInterface $term, $topics=array(), $parents=array(), $header=array())
 
 buildActionLinks ($vid, TermInterface $forum_term=NULL)
 

Protected Attributes

 $forumManager
 
 $vocabularyStorage
 
 $termStorage
 
 $nodeAccess
 
 $fieldMap
 
 $nodeTypeStorage
 
 $renderer
 
 $nodeEntityTypeDefinition
 
 $commentEntityTypeDefinition
 

Detailed Description

Controller routines for forum routes.

Constructor & Destructor Documentation

__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 
)

Constructs a ForumController object.

Parameters
\Drupal\forum\ForumManagerInterface$forum_managerThe forum manager service.
\Drupal\taxonomy\VocabularyStorageInterface$vocabulary_storageVocabulary storage.
\Drupal\taxonomy\TermStorageInterface$term_storageTerm storage.
\Drupal\Core\Session\AccountInterface$current_userThe current logged in user.
\Drupal\Core\Entity\EntityAccessControlHandlerInterface$node_accessNode access control handler.
array$field_mapArray of active fields on the site.
\Drupal\Core\Entity\EntityStorageInterface$node_type_storageNode type storage handler.
\Drupal\Core\Render\RendererInterface$rendererThe renderer.
\Drupal\Core\Entity\EntityTypeInterface$node_entity_type_definitionNode entity type definition object
\Drupal\Core\Entity\EntityTypeInterface$comment_entity_type_definitionComment entity type definition object

References Drupal\currentUser().

Here is the call graph for this function:

Member Function Documentation

addContainer ( )

Returns add container entity form.

Returns
array Render array for the add form.

References Drupal\config().

Here is the call graph for this function:

addForum ( )

Returns add forum entity form.

Returns
array Render array for the add form.

References Drupal\config().

Here is the call graph for this function:

build (   $forums,
TermInterface  $term,
  $topics = array(),
  $parents = array(),
  $header = array() 
)
protected

Returns a renderable forum index page array.

Parameters
array$forumsA list of forums.
\Drupal\taxonomy\TermInterface$termThe taxonomy term of the forum.
array$topicsThe topics of this forum.
array$parentsThe parent forums in relation this forum.
array$headerArray of header cells.
Returns
array A render array.

References ForumController\buildActionLinks(), Drupal\config(), TermInterface\getName(), EntityInterface\id(), and Cache\mergeTags().

Referenced by ForumController\forumIndex(), and ForumController\forumPage().

Here is the call graph for this function:

Here is the caller graph for this function:

buildActionLinks (   $vid,
TermInterface  $forum_term = NULL 
)
protected

Generates an action link to display at the top of the forum listing.

Parameters
string$vidVocabulary ID.
\Drupal\taxonomy\TermInterface$forum_termThe term for which the links are to be built.
Returns
array Render array containing the links.

References Drupal\currentUser(), Url\fromRoute(), and t().

Referenced by ForumController\build().

Here is the call graph for this function:

Here is the caller graph for this function:

forumIndex ( )

Returns forum index page.

Returns
array A render array.

References ForumController\build(), Drupal\config(), and t().

Here is the call graph for this function:

forumPage ( TermInterface  $taxonomy_term)

Returns forum page for a given forum.

Parameters
\Drupal\taxonomy\TermInterface$taxonomy_termThe forum to render the page for.
Returns
array A render array.

References ForumController\build(), Drupal\config(), Drupal\currentUser(), and EntityInterface\id().

Here is the call graph for this function:


The documentation for this class was generated from the following file: