Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
mod_forum\local\renderers\posts Class Reference

Posts renderer class. More...

Public Member Functions

 __construct (renderer_base $renderer, exported_posts_builder $exportedpostsbuilder, string $template, callable $postprocessfortemplate=null)
 Constructor.
 
 render (stdClass $user, array $forums, array $discussions, array $posts)
 Render the given posts for the forums and discussions.
 

Detailed Description

Posts renderer class.

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

Constructor & Destructor Documentation

◆ __construct()

mod_forum\local\renderers\posts::__construct ( renderer_base $renderer,
exported_posts_builder $exportedpostsbuilder,
string $template,
callable $postprocessfortemplate = null )

Constructor.

Parameters
renderer_base$rendererRenderer base
exported_posts_builder$exportedpostsbuilderBuilder for building exported posts
string$templateThe template to render
callable$postprocessfortemplateFunction to process exported posts before template rendering

Member Function Documentation

◆ render()

mod_forum\local\renderers\posts::render ( stdClass $user,
array $forums,
array $discussions,
array $posts )

Render the given posts for the forums and discussions.

Parameters
stdClass$userThe user viewing the posts
forum_entity[]$forumsA list of all forums for these posts
discussion_entity[]$discussionsA list of all discussions for these posts
post_entity[]$postsThe posts to render
Return values
string

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