The discussion list renderer.
More...
|
| __construct (forum_entity $forum, renderer_base $renderer, legacy_data_mapper_factory $legacydatamapperfactory, exporter_factory $exporterfactory, vault_factory $vaultfactory, builder_factory $builderfactory, capability_manager $capabilitymanager, url_factory $urlfactory, forum_gradeitem $forumgradeitem, string $template, array $notifications=[], callable $postprocessfortemplate=null) |
| Constructor for a new discussion list renderer.
|
|
| render (stdClass $user, cm_info $cm, ?int $groupid, ?int $sortorder, ?int $pageno, ?int $pagesize, int $displaymode=null, bool $enablediscussioncreation=true) |
| Render for the specified user.
|
|
| render_new_discussion (stdClass $user, ?int $groupid) |
| Add new discussion button to the action bar for tertiary nav.
|
|
◆ __construct()
mod_forum\local\renderers\discussion_list::__construct |
( |
forum_entity | $forum, |
|
|
renderer_base | $renderer, |
|
|
legacy_data_mapper_factory | $legacydatamapperfactory, |
|
|
exporter_factory | $exporterfactory, |
|
|
vault_factory | $vaultfactory, |
|
|
builder_factory | $builderfactory, |
|
|
capability_manager | $capabilitymanager, |
|
|
url_factory | $urlfactory, |
|
|
forum_gradeitem | $forumgradeitem, |
|
|
string | $template, |
|
|
array | $notifications = [], |
|
|
callable | $postprocessfortemplate = null ) |
Constructor for a new discussion list renderer.
- Parameters
-
forum_entity | $forum | The forum entity to be rendered |
renderer_base | $renderer | The renderer used to render the view |
legacy_data_mapper_factory | $legacydatamapperfactory | The factory used to fetch a legacy record |
exporter_factory | $exporterfactory | The factory used to fetch exporter instances |
vault_factory | $vaultfactory | The factory used to fetch the vault instances |
builder_factory | $builderfactory | The factory used to fetch the builder instances |
capability_manager | $capabilitymanager | The managed used to check capabilities on the forum |
url_factory | $urlfactory | The factory used to create URLs in the forum |
string | $template | |
notification[] | $notifications | A list of any notifications to be displayed within the page |
callable | null | $postprocessfortemplate | Callback function to process discussion lists for templates |
◆ render()
mod_forum\local\renderers\discussion_list::render |
( |
stdClass | $user, |
|
|
cm_info | $cm, |
|
|
?int | $groupid, |
|
|
?int | $sortorder, |
|
|
?int | $pageno, |
|
|
?int | $pagesize, |
|
|
int | $displaymode = null, |
|
|
bool | $enablediscussioncreation = true ) |
Render for the specified user.
- Parameters
-
stdClass | $user | The user to render for |
cm_info | $cm | The course module info for this discussion list |
int | $groupid | The group to render |
int | $sortorder | The sort order to use when selecting the discussions in the list |
int | $pageno | The zero-indexed page number to use |
int | $pagesize | The number of discussions to show on the page |
int | $displaymode | The discussion display mode |
bool | $enablediscussioncreation | To show the discussion button. |
- Return values
-
string | The rendered content for display |
◆ render_new_discussion()
mod_forum\local\renderers\discussion_list::render_new_discussion |
( |
stdClass | $user, |
|
|
?int | $groupid ) |
Add new discussion button to the action bar for tertiary nav.
- Parameters
-
stdClass | $user | The user object. |
int | null | $groupid | The group id. |
- Return values
-
string | rendered HTML string |
The documentation for this class was generated from the following file:
- mod/forum/classes/local/renderers/discussion_list.php