Discussion renderer class.
More...
|
| __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.
|
|
Discussion renderer class.
- Copyright
- 2019 Ryan Wyllie ryan@.nosp@m.mood.nosp@m.le.co.nosp@m.m
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __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 | $forum | The forum that the discussion belongs to |
discussion_entity | $discussion | The discussion entity |
int | $displaymode | The display mode to render the discussion in |
renderer_base | $renderer | Renderer base |
posts_renderer | $postsrenderer | A posts renderer |
moodle_page | $page | The page this discussion is being rendered for |
legacy_data_mapper_factory | $legacydatamapperfactory | Legacy data mapper factory |
exporter_factory | $exporterfactory | Exporter factory |
vault_factory | $vaultfactory | Vault factory |
url_factory | $urlfactory | URL factory |
entity_factory | $entityfactory | Entity factory |
capability_manager | $capabilitymanager | Capability manager |
rating_manager | $ratingmanager | Rating manager |
sorter_entity | $exportedpostsorter | Sorter for the exported posts |
moodle_url | $baseurl | The base URL for the discussion |
array | $notifications | List of HTML notifications to display |
callable | null | $postprocessfortemplate | Post processing for template callback |
◆ 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 | $user | The user viewing the discussion |
post_entity | $firstpost | The first post in the discussion |
array | $replies | List of replies to the first post |
- Return values
-
string | HTML for the discussion |
The documentation for this class was generated from the following file:
- mod/forum/classes/local/renderers/discussion.php