Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | List of all members
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. More...
 
 render (stdClass $user, array $forums, array $discussions, array $posts)
 Render the given posts for the forums and discussions. More...
 

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: