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

Renderer factory. More...

Public Member Functions

 __construct (legacy_data_mapper_factory $legacydatamapperfactory, exporter_factory $exporterfactory, vault_factory $vaultfactory, manager_factory $managerfactory, entity_factory $entityfactory, builder_factory $builderfactory, url_factory $urlfactory, moodle_page $page)
 Constructor.
 
 get_blog_discussion_list_renderer (forum_entity $forum)
 Create a blog type discussion list renderer.
 
 get_discussion_list_renderer (forum_entity $forum)
 Create a standard type discussion list renderer.
 
 get_discussion_renderer (forum_entity $forum, discussion_entity $discussion, int $displaymode)
 Create a discussion renderer for the given forum and discussion.
 
 get_frontpage_news_discussion_list_renderer (forum_entity $forum)
 Create a discussion list renderer for the social course format.
 
 get_posts_renderer ()
 Create a posts renderer to render posts without defined parent/reply relationships.
 
 get_posts_search_results_renderer (array $searchterms)
 Create a posts renderer to render posts in the forum search results.
 
 get_single_discussion_list_renderer (forum_entity $forum, discussion_entity $discussion, bool $hasmultiplediscussions, int $displaymode)
 Create a single type discussion list renderer.
 
 get_single_discussion_posts_renderer (int $displaymode=null, bool $readonly=false)
 Create a posts renderer to render a list of posts in a single discussion.
 
 get_social_discussion_list_renderer (forum_entity $forum)
 Create a discussion list renderer for the social course format.
 
 get_user_forum_posts_report_renderer (bool $addlinkstocontext)
 Create a posts renderer to render posts in mod/forum/user.php.
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

mod_forum\local\factories\renderer::__construct ( legacy_data_mapper_factory $legacydatamapperfactory,
exporter_factory $exporterfactory,
vault_factory $vaultfactory,
manager_factory $managerfactory,
entity_factory $entityfactory,
builder_factory $builderfactory,
url_factory $urlfactory,
moodle_page $page )

Constructor.

Parameters
legacy_data_mapper_factory$legacydatamapperfactoryLegacy data mapper factory
exporter_factory$exporterfactoryExporter factory
vault_factory$vaultfactoryVault factory
manager_factory$managerfactoryManager factory
entity_factory$entityfactoryEntity factory
builder_factory$builderfactoryBuilder factory
url_factory$urlfactoryURL factory
moodle_page$pageMoodle page

Member Function Documentation

◆ get_blog_discussion_list_renderer()

mod_forum\local\factories\renderer::get_blog_discussion_list_renderer ( forum_entity $forum)

Create a blog type discussion list renderer.

Parameters
forum_entity$forumThe forum that the discussions belong to
Return values
discussion_list_renderer

◆ get_discussion_list_renderer()

mod_forum\local\factories\renderer::get_discussion_list_renderer ( forum_entity $forum)

Create a standard type discussion list renderer.

Parameters
forum_entity$forumThe forum that the discussions belong to
Return values
discussion_list_renderer

◆ get_discussion_renderer()

mod_forum\local\factories\renderer::get_discussion_renderer ( forum_entity $forum,
discussion_entity $discussion,
int $displaymode )

Create a discussion renderer for the given forum and discussion.

Parameters
forum_entity$forumForum the discussion belongs to
discussion_entity$discussionDiscussion to render
int$displaymodeHow should the posts be formatted?
Return values
discussion_renderer

◆ get_frontpage_news_discussion_list_renderer()

mod_forum\local\factories\renderer::get_frontpage_news_discussion_list_renderer ( forum_entity $forum)

Create a discussion list renderer for the social course format.

Parameters
forum_entity$forumThe forum that the discussions belong to
Return values
discussion_list_renderer

◆ get_posts_renderer()

mod_forum\local\factories\renderer::get_posts_renderer ( )

Create a posts renderer to render posts without defined parent/reply relationships.

Return values
posts_renderer

◆ get_posts_search_results_renderer()

mod_forum\local\factories\renderer::get_posts_search_results_renderer ( array $searchterms)

Create a posts renderer to render posts in the forum search results.

Parameters
string[]$searchtermsThe search terms to be highlighted in the posts
Return values
posts_renderer

◆ get_single_discussion_list_renderer()

mod_forum\local\factories\renderer::get_single_discussion_list_renderer ( forum_entity $forum,
discussion_entity $discussion,
bool $hasmultiplediscussions,
int $displaymode )

Create a single type discussion list renderer.

Parameters
forum_entity$forumForum the discussion belongs to
discussion_entity$discussionThe discussion entity
bool$hasmultiplediscussionsWhether the forum has multiple discussions (more than one)
int$displaymodeHow should the posts be formatted?
Return values
discussion_renderer

◆ get_single_discussion_posts_renderer()

mod_forum\local\factories\renderer::get_single_discussion_posts_renderer ( int $displaymode = null,
bool $readonly = false )

Create a posts renderer to render a list of posts in a single discussion.

Parameters
int | null$displaymodeHow should the posts be formatted?
bool$readonlyShould the posts include the actions to reply, delete, etc?
Return values
posts_renderer

◆ get_social_discussion_list_renderer()

mod_forum\local\factories\renderer::get_social_discussion_list_renderer ( forum_entity $forum)

Create a discussion list renderer for the social course format.

Parameters
forum_entity$forumThe forum that the discussions belong to
Return values
discussion_list_renderer

◆ get_user_forum_posts_report_renderer()

mod_forum\local\factories\renderer::get_user_forum_posts_report_renderer ( bool $addlinkstocontext)

Create a posts renderer to render posts in mod/forum/user.php.

Parameters
bool$addlinkstocontextShould links to the course, forum, and discussion be included?
Return values
posts_renderer

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