Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
A URL factory for the forum. More...
Public Member Functions | |
__construct (legacy_data_mapper_factory $legacydatamapperfactory) | |
Constructor. More... | |
get_author_group_url (\stdClass $group) | |
Get the url to view an author's group. More... | |
get_author_profile_image_url (author_entity $author, int $authorcontextid=null, int $size=100) | |
Get the url to view the author's profile image. More... | |
get_author_profile_url (author_entity $author, int $courseid) | |
Get the url to view an author's profile. More... | |
get_course_url_from_courseid (int $courseid) | |
Get the course url from the given course id. More... | |
get_course_url_from_forum (forum_entity $forum) | |
Get the course url from the given forum entity. More... | |
get_delete_post_url_from_post (post_entity $post) | |
Get the url to delete a post. More... | |
get_discussion_create_url (forum_entity $forum) | |
Get the create discussion url for the given forum. More... | |
get_discussion_subscribe_url (discussion_entity $discussion) | |
Get the url to subscribe to a discussion. More... | |
get_discussion_view_first_unread_post_url_from_discussion (discussion_entity $discussion) | |
Get the url to view the first unread post in a discussion. More... | |
get_discussion_view_latest_post_url_from_discussion (discussion_entity $discussion, ?int $latestpost) | |
Get the url to view the latest post in a discussion. More... | |
get_discussion_view_url_from_discussion (discussion_entity $discussion) | |
Get the view discussion url from the given discussion. More... | |
get_discussion_view_url_from_discussion_id (int $discussionid) | |
Get the view discussion url from the given discussion id. More... | |
get_discussion_view_url_from_post (post_entity $post) | |
Get the url to view a discussion from a post. More... | |
get_edit_post_url_from_post (forum_entity $forum, post_entity $post) | |
Get the url to edit a post. More... | |
get_export_attachment_url_from_post_and_attachment (post_entity $post, stored_file $attachment) | |
Get the url to export attachments for a post. More... | |
get_export_post_url_from_post (post_entity $post) | |
Get the url to export (see portfolios) a post. More... | |
get_forum_view_url_from_course_module_id (int $coursemoduleid, ?int $pageno=null, ?int $sortorder=null) | |
Get the view forum url for the given course module id and optionally a page number. More... | |
get_forum_view_url_from_forum (forum_entity $forum, ?int $pageno=null, ?int $sortorder=null) | |
Get the view forum url for the given forum and optionally a page number. More... | |
get_mark_all_discussions_as_read_url (forum_entity $forum) | |
Get the url to mark all discussions as read. More... | |
get_mark_discussion_as_read_url_from_discussion (forum_entity $forum, discussion_entity $discussion) | |
Get the url to mark a discussion as read. More... | |
get_mark_post_as_read_url_from_post (post_entity $post, int $displaymode=FORUM_MODE_THREADED) | |
Get the url to mark a post as read. More... | |
get_mark_post_as_unread_url_from_post (post_entity $post, int $displaymode=FORUM_MODE_THREADED) | |
Get the url to mark a post as unread. More... | |
get_pin_discussion_url_from_discussion (discussion_entity $discussion) | |
Generate the pinned discussion link. More... | |
get_reply_to_post_url_from_post (post_entity $post) | |
Get the url to reply to a post. More... | |
get_split_discussion_at_post_url_from_post (post_entity $post) | |
Get the url to split a discussion at a post. More... | |
get_view_isolated_post_url_from_post (post_entity $post) | |
Get the url to view a post and it's replies in isolation without the rest of the discussion. More... | |
get_view_isolated_post_url_from_post_id (int $discussionid, int $postid) | |
Get the url to view a post and it's replies in isolation without the rest of the discussion. More... | |
get_view_post_url_from_post (post_entity $post) | |
Get the url to view a post in the context of the rest of the discussion. More... | |
get_view_post_url_from_post_id (int $discussionid, int $postid) | |
Get the url to view a discussion from a discussion id and post id. More... | |
A URL factory for the forum.
mod_forum\local\factories\url::__construct | ( | legacy_data_mapper_factory | $legacydatamapperfactory | ) |
Constructor.
legacy_data_mapper_factory | $legacydatamapperfactory | Legacy data mapper factory |
mod_forum\local\factories\url::get_author_group_url | ( | \stdClass | $group | ) |
mod_forum\local\factories\url::get_author_profile_image_url | ( | author_entity | $author, |
int | $authorcontextid = null , |
||
int | $size = 100 |
||
) |
Get the url to view the author's profile image.
The author's context id should be provided to prevent the code from needing to load it.
author_entity | $author | The author |
int | null | $authorcontextid | The author context id |
int | $size | The size of the image to return |
moodle_url |
mod_forum\local\factories\url::get_author_profile_url | ( | author_entity | $author, |
int | $courseid | ||
) |
Get the url to view an author's profile.
author_entity | $author | The author |
int | $courseid | The course id |
moodle_url |
mod_forum\local\factories\url::get_course_url_from_courseid | ( | int | $courseid | ) |
Get the course url from the given course id.
int | $courseid | The course id |
moodle_url |
mod_forum\local\factories\url::get_course_url_from_forum | ( | forum_entity | $forum | ) |
Get the course url from the given forum entity.
forum_entity | $forum | The forum entity |
moodle_url |
mod_forum\local\factories\url::get_delete_post_url_from_post | ( | post_entity | $post | ) |
mod_forum\local\factories\url::get_discussion_create_url | ( | forum_entity | $forum | ) |
Get the create discussion url for the given forum.
forum_entity | $forum | The forum entity |
moodle_url |
mod_forum\local\factories\url::get_discussion_subscribe_url | ( | discussion_entity | $discussion | ) |
Get the url to subscribe to a discussion.
discussion_entity | $discussion | The discussion |
moodle_url |
mod_forum\local\factories\url::get_discussion_view_first_unread_post_url_from_discussion | ( | discussion_entity | $discussion | ) |
Get the url to view the first unread post in a discussion.
discussion_entity | $discussion | The discussion |
moodle_url |
mod_forum\local\factories\url::get_discussion_view_latest_post_url_from_discussion | ( | discussion_entity | $discussion, |
?int | $latestpost | ||
) |
Get the url to view the latest post in a discussion.
discussion_entity | $discussion | The discussion |
int | null | $latestpost | The id of the latest post |
moodle_url |
mod_forum\local\factories\url::get_discussion_view_url_from_discussion | ( | discussion_entity | $discussion | ) |
Get the view discussion url from the given discussion.
discussion_entity | $discussion | The discussion |
moodle_url |
mod_forum\local\factories\url::get_discussion_view_url_from_discussion_id | ( | int | $discussionid | ) |
Get the view discussion url from the given discussion id.
int | $discussionid | The discussion id |
moodle_url |
mod_forum\local\factories\url::get_discussion_view_url_from_post | ( | post_entity | $post | ) |
Get the url to view a discussion from a post.
post_entity | $post | The post |
moodle_url |
mod_forum\local\factories\url::get_edit_post_url_from_post | ( | forum_entity | $forum, |
post_entity | $post | ||
) |
Get the url to edit a post.
forum_entity | $forum | The forum the post belongs to |
post_entity | $post | The post |
moodle_url |
mod_forum\local\factories\url::get_export_attachment_url_from_post_and_attachment | ( | post_entity | $post, |
stored_file | $attachment | ||
) |
Get the url to export attachments for a post.
post_entity | $post | The post |
stored_file | $attachment |
moodle_url|null |
mod_forum\local\factories\url::get_export_post_url_from_post | ( | post_entity | $post | ) |
Get the url to export (see portfolios) a post.
post_entity | $post | The post |
moodle_url |
mod_forum\local\factories\url::get_forum_view_url_from_course_module_id | ( | int | $coursemoduleid, |
?int | $pageno = null , |
||
?int | $sortorder = null |
||
) |
Get the view forum url for the given course module id and optionally a page number.
int | $coursemoduleid | The course module id |
int | null | $pageno | The page number |
int | null | $sortorder | The sorting order |
moodle_url |
mod_forum\local\factories\url::get_forum_view_url_from_forum | ( | forum_entity | $forum, |
?int | $pageno = null , |
||
?int | $sortorder = null |
||
) |
Get the view forum url for the given forum and optionally a page number.
forum_entity | $forum | The forum entity |
int | null | $pageno | The page number |
int | null | $sortorder | The sorting order |
moodle_url |
mod_forum\local\factories\url::get_mark_all_discussions_as_read_url | ( | forum_entity | $forum | ) |
Get the url to mark all discussions as read.
forum_entity | $forum | The forum that the discussions belong to |
moodle_url |
mod_forum\local\factories\url::get_mark_discussion_as_read_url_from_discussion | ( | forum_entity | $forum, |
discussion_entity | $discussion | ||
) |
Get the url to mark a discussion as read.
forum_entity | $forum | The forum that the discussion belongs to |
discussion_entity | $discussion | The discussion |
moodle_url |
mod_forum\local\factories\url::get_mark_post_as_read_url_from_post | ( | post_entity | $post, |
int | $displaymode = FORUM_MODE_THREADED |
||
) |
Get the url to mark a post as read.
post_entity | $post | The post |
int | $displaymode | The display mode to show the forum in after marking as read |
moodle_url |
mod_forum\local\factories\url::get_mark_post_as_unread_url_from_post | ( | post_entity | $post, |
int | $displaymode = FORUM_MODE_THREADED |
||
) |
Get the url to mark a post as unread.
post_entity | $post | The post |
int | $displaymode | The display mode to show the forum in after marking as unread |
moodle_url |
mod_forum\local\factories\url::get_pin_discussion_url_from_discussion | ( | discussion_entity | $discussion | ) |
Generate the pinned discussion link.
discussion_entity | $discussion |
moodle_url |
moodle_exception |
mod_forum\local\factories\url::get_reply_to_post_url_from_post | ( | post_entity | $post | ) |
mod_forum\local\factories\url::get_split_discussion_at_post_url_from_post | ( | post_entity | $post | ) |
Get the url to split a discussion at a post.
post_entity | $post | The post |
moodle_url |
mod_forum\local\factories\url::get_view_isolated_post_url_from_post | ( | post_entity | $post | ) |
Get the url to view a post and it's replies in isolation without the rest of the discussion.
post_entity | $post | The post |
moodle_url |
mod_forum\local\factories\url::get_view_isolated_post_url_from_post_id | ( | int | $discussionid, |
int | $postid | ||
) |
Get the url to view a post and it's replies in isolation without the rest of the discussion.
int | $discussionid | The discussion id |
int | $postid | The post id |
moodle_url |
mod_forum\local\factories\url::get_view_post_url_from_post | ( | post_entity | $post | ) |
Get the url to view a post in the context of the rest of the discussion.
post_entity | $post | The post |
moodle_url |
mod_forum\local\factories\url::get_view_post_url_from_post_id | ( | int | $discussionid, |
int | $postid | ||
) |
Get the url to view a discussion from a discussion id and post id.
int | $discussionid | The discussion id |
int | $postid | The post id |
moodle_url |