Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
mod_forum\local\renderers\discussion Class Reference

Discussion renderer class. More...

Public Member Functions

 __construct (forum_entity $forum, discussion_entity $discussion, int $displaymode, renderer_base $renderer, posts_renderer $postsrenderer, moodle_page $page, legacy_data_mapper_factory $legacydatamapperfactory, exporter_factory $exporterfactory, vault_factory $vaultfactory, url_factory $urlfactory, entity_factory $entityfactory, capability_manager $capabilitymanager, rating_manager $ratingmanager, sorter_entity $exportedpostsorter, moodle_url $baseurl, array $notifications=[], callable $postprocessfortemplate=null)
 Constructor.
 
 render (stdClass $user, post_entity $firstpost, array $replies)
 Render the discussion for the given user in the specified display mode.
 

Detailed Description

Discussion renderer class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

mod_forum\local\renderers\discussion::__construct ( forum_entity $forum,
discussion_entity $discussion,
int $displaymode,
renderer_base $renderer,
posts_renderer $postsrenderer,
moodle_page $page,
legacy_data_mapper_factory $legacydatamapperfactory,
exporter_factory $exporterfactory,
vault_factory $vaultfactory,
url_factory $urlfactory,
entity_factory $entityfactory,
capability_manager $capabilitymanager,
rating_manager $ratingmanager,
sorter_entity $exportedpostsorter,
moodle_url $baseurl,
array $notifications = [],
callable $postprocessfortemplate = null )

Constructor.

Parameters
forum_entity$forumThe forum that the discussion belongs to
discussion_entity$discussionThe discussion entity
int$displaymodeThe display mode to render the discussion in
renderer_base$rendererRenderer base
posts_renderer$postsrendererA posts renderer
moodle_page$pageThe page this discussion is being rendered for
legacy_data_mapper_factory$legacydatamapperfactoryLegacy data mapper factory
exporter_factory$exporterfactoryExporter factory
vault_factory$vaultfactoryVault factory
url_factory$urlfactoryURL factory
entity_factory$entityfactoryEntity factory
capability_manager$capabilitymanagerCapability manager
rating_manager$ratingmanagerRating manager
sorter_entity$exportedpostsorterSorter for the exported posts
moodle_url$baseurlThe base URL for the discussion
array$notificationsList of HTML notifications to display
callable | null$postprocessfortemplatePost processing for template callback

Member Function Documentation

◆ render()

mod_forum\local\renderers\discussion::render ( stdClass $user,
post_entity $firstpost,
array $replies )

Render the discussion for the given user in the specified display mode.

Parameters
stdClass$userThe user viewing the discussion
post_entity$firstpostThe first post in the discussion
array$repliesList of replies to the first post
Return values
stringHTML for the discussion

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