Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250605) (9223e346c3e)
|
Public Member Functions | |
__construct ($course, $cm, $forum, $discussion, $post, $author, $recipient, $canreply) | |
Builds a renderable forum post. | |
__set ($key, $value) | |
Magically sets a property against this object. | |
export_for_template (\renderer_base $renderer, $plaintext=false) | |
Export this data so it can be used as the context for a mustache template. | |
get_author_fullname () | |
The fullname of the post author. | |
get_author_picture (\renderer_base $renderer) | |
The HTML for the author's user picture. | |
get_authorlink () | |
Get the link to the author's profile page. | |
get_coursefullname () | |
The full name of the course that the forum is in. | |
get_courseidnumber () | |
ID number of the course that the forum is in. | |
get_courselink () | |
Get the link to the course. | |
get_coursename () | |
The name of the course that the forum is in. | |
get_discussionlink () | |
Get the link to the current discussion. | |
get_discussionname () | |
The name of the current discussion. | |
get_forumindexlink () | |
Get the link to the forum index for this course. | |
get_forumname () | |
The name of the forum. | |
get_forumviewlink () | |
Get the link to the view page for this forum. | |
get_group_picture (\renderer_base $renderer) | |
The HTML for a group picture. | |
get_is_firstpost () | |
Whether this is the first post. | |
get_parentpostlink () | |
Get the link to the parent post. | |
get_permalink () | |
Get the link to the current post, including post anchor. | |
get_postanchor () | |
The plaintext anchor id for the current post. | |
get_postdate () | |
The date of the post, formatted according to the postto user's preferences. | |
get_replylink () | |
Get the link to reply to the current post. | |
get_showdiscussionname () | |
Whether to show the discussion name. | |
get_subject () | |
The formatted subject for the current post. | |
get_unsubscribediscussionlink () | |
Get the link to unsubscribe from the discussion. | |
get_unsubscribeforumlink () | |
Get the link to unsubscribe from the forum. | |
Protected Member Functions | |
_get_discussionlink () | |
Get the link to the current discussion. | |
export_for_template_html (\mod_forum_renderer $renderer) | |
Export this data so it can be used as the context for a mustache template. | |
export_for_template_shared (\mod_forum_renderer $renderer) | |
Export this data so it can be used as the context for a mustache template. | |
export_for_template_text (\mod_forum_renderer $renderer) | |
Export this data so it can be used as the context for a mustache template. | |
get_postto () | |
The recipient of the post. | |
Protected Attributes | |
object | $author = null |
The user that wrote the post. | |
boolean | $canreply = false |
Whether the user can reply to this post. | |
object | $cm = null |
The course module for the forum. | |
object | $course = null |
The course that the forum post is in. | |
object | $discussion = null |
The discussion that the forum post is in. | |
object | $forum = null |
The forum that the post is in. | |
object | $post = null |
The forum post being displayed. | |
stdClass | $userfrom |
user record. | |
object | $userto = null |
The user that is reading the post. | |
boolean | $viewfullnames = false |
Whether to override forum display when displaying usernames. | |
array | $writablekeys |
An associative array indicating which keys on this object should be writeable. | |
mod_forum\output\forum_post::__construct | ( | $course, | |
$cm, | |||
$forum, | |||
$discussion, | |||
$post, | |||
$author, | |||
$recipient, | |||
$canreply ) |
Builds a renderable forum post.
object | $course | Course of the forum |
object | $cm | Course Module of the forum |
object | $forum | The forum of the post |
object | $discussion | Discussion thread in which the post appears |
object | $post | The post |
object | $author | Author of the post |
object | $recipient | Recipient of the email |
bool | $canreply | True if the user can reply to the post |
mod_forum\output\forum_post::__set | ( | $key, | |
$value ) |
Magically sets a property against this object.
string | $key | |
mixed | $value |
|
protected |
Get the link to the current discussion.
string |
mod_forum\output\forum_post::export_for_template | ( | \renderer_base | $renderer, |
$plaintext = false ) |
Export this data so it can be used as the context for a mustache template.
mod_forum_renderer | $renderer | The render to be used for formatting the message and attachments |
bool | $plaintext | Whethe the target is a plaintext target |
array | Data ready for use in a mustache template |
|
protected |
Export this data so it can be used as the context for a mustache template.
mod_forum_renderer | $renderer | The render to be used for formatting the message and attachments |
array | Data ready for use in a mustache template |
|
protected |
Export this data so it can be used as the context for a mustache template.
mod_forum_renderer | $renderer | The render to be used for formatting the message and attachments |
stdClass | Data ready for use in a mustache template |
|
protected |
Export this data so it can be used as the context for a mustache template.
mod_forum_renderer | $renderer | The render to be used for formatting the message and attachments |
array | Data ready for use in a mustache template |
mod_forum\output\forum_post::get_author_fullname | ( | ) |
The fullname of the post author.
string |
mod_forum\output\forum_post::get_author_picture | ( | \renderer_base | $renderer | ) |
The HTML for the author's user picture.
renderer_base | $renderer |
string |
mod_forum\output\forum_post::get_authorlink | ( | ) |
Get the link to the author's profile page.
string |
mod_forum\output\forum_post::get_coursefullname | ( | ) |
The full name of the course that the forum is in.
string |
mod_forum\output\forum_post::get_courseidnumber | ( | ) |
ID number of the course that the forum is in.
string |
mod_forum\output\forum_post::get_courselink | ( | ) |
Get the link to the course.
string |
mod_forum\output\forum_post::get_coursename | ( | ) |
The name of the course that the forum is in.
string |
mod_forum\output\forum_post::get_discussionlink | ( | ) |
Get the link to the current discussion.
string |
mod_forum\output\forum_post::get_discussionname | ( | ) |
The name of the current discussion.
string |
mod_forum\output\forum_post::get_forumindexlink | ( | ) |
Get the link to the forum index for this course.
string |
mod_forum\output\forum_post::get_forumname | ( | ) |
The name of the forum.
string |
mod_forum\output\forum_post::get_forumviewlink | ( | ) |
Get the link to the view page for this forum.
string |
mod_forum\output\forum_post::get_group_picture | ( | \renderer_base | $renderer | ) |
The HTML for a group picture.
renderer_base | $renderer |
string |
mod_forum\output\forum_post::get_is_firstpost | ( | ) |
Whether this is the first post.
boolean |
mod_forum\output\forum_post::get_parentpostlink | ( | ) |
Get the link to the parent post.
string |
mod_forum\output\forum_post::get_permalink | ( | ) |
Get the link to the current post, including post anchor.
string |
mod_forum\output\forum_post::get_postanchor | ( | ) |
The plaintext anchor id for the current post.
string |
mod_forum\output\forum_post::get_postdate | ( | ) |
The date of the post, formatted according to the postto user's preferences.
string |
|
protected |
The recipient of the post.
string |
mod_forum\output\forum_post::get_replylink | ( | ) |
Get the link to reply to the current post.
string |
mod_forum\output\forum_post::get_showdiscussionname | ( | ) |
Whether to show the discussion name.
If the forum name matches the discussion name, the discussion name is not typically displayed.
boolean |
mod_forum\output\forum_post::get_subject | ( | ) |
The formatted subject for the current post.
string |
mod_forum\output\forum_post::get_unsubscribediscussionlink | ( | ) |
Get the link to unsubscribe from the discussion.
string |
mod_forum\output\forum_post::get_unsubscribeforumlink | ( | ) |
Get the link to unsubscribe from the forum.
string |
|
protected |
The user that wrote the post.
$author
|
protected |
Whether the user can reply to this post.
$canreply
|
protected |
The course module for the forum.
$cm
|
protected |
The course that the forum post is in.
$course
|
protected |
The discussion that the forum post is in.
$discussion
|
protected |
The forum that the post is in.
$forum
|
protected |
The forum post being displayed.
$post
|
protected |
The user that is reading the post.
$userto
|
protected |
Whether to override forum display when displaying usernames.
$viewfullnames
|
protected |
An associative array indicating which keys on this object should be writeable.
$writablekeys