Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402]
Discussion renderer.
Copyright: | 2019 Ryan Wyllie <ryan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 461 lines (19 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
discussion:: (9 methods):
__construct()
render()
get_groups_available_in_forum()
get_exported_discussion()
get_display_mode_selector_html()
get_move_discussion_html()
get_export_discussion_html()
get_notifications()
get_neighbour_links_html()
Class: discussion - X-Ref
Discussion renderer class.__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) X-Ref |
Constructor. param: forum_entity $forum The forum that the discussion belongs to param: discussion_entity $discussion The discussion entity param: int $displaymode The display mode to render the discussion in param: renderer_base $renderer Renderer base param: posts_renderer $postsrenderer A posts renderer param: moodle_page $page The page this discussion is being rendered for param: legacy_data_mapper_factory $legacydatamapperfactory Legacy data mapper factory param: exporter_factory $exporterfactory Exporter factory param: vault_factory $vaultfactory Vault factory param: url_factory $urlfactory URL factory param: entity_factory $entityfactory Entity factory param: capability_manager $capabilitymanager Capability manager param: rating_manager $ratingmanager Rating manager param: sorter_entity $exportedpostsorter Sorter for the exported posts param: moodle_url $baseurl The base URL for the discussion param: array $notifications List of HTML notifications to display param: callable|null $postprocessfortemplate Post processing for template callback |
render(stdClass $user,post_entity $firstpost,array $replies) X-Ref |
Render the discussion for the given user in the specified display mode. param: stdClass $user The user viewing the discussion param: post_entity $firstpost The first post in the discussion param: array $replies List of replies to the first post return: string HTML for the discussion |
get_groups_available_in_forum() X-Ref |
Get the groups details for all groups available to the forum. return: stdClass[] |
get_exported_discussion(stdClass $user) X-Ref |
Get the exported discussion. param: stdClass $user The user viewing the discussion return: array |
get_display_mode_selector_html(int $displaymode, stdClass $user) X-Ref |
Get the HTML for the display mode selector. param: int $displaymode The current display mode param: stdClass $user The current user return: string |
get_move_discussion_html() X-Ref |
Get the HTML to render the move discussion selector and button. return: string |
get_export_discussion_html(stdClass $user) X-Ref |
Get the HTML to render the export discussion button. param: stdClass $user The user viewing the discussion return: string|null |
get_notifications($user) X-Ref |
Get a list of notification HTML to render in the page. param: stdClass $user The user viewing the discussion return: string[] |
get_neighbour_links_html() X-Ref |
Get HTML to display the neighbour links. return: string |