Discussion vault class.
Copyright: | 2019 Ryan Wyllie <ryan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 160 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
discussion:: (8 methods):
get_table_alias()
generate_get_records_sql()
from_db_records()
get_all_discussions_in_forum()
get_first_discussion_in_forum()
get_last_discussion_in_forum()
get_count_discussions_in_forum()
update_discussion()
Class: discussion - X-Ref
Discussion vault class.get_table_alias() X-Ref |
Get the table alias. return: string |
generate_get_records_sql(string $wheresql = null, string $sortsql = null, ?int $userid = null) X-Ref |
Build the SQL to be used in get_records_sql. param: string|null $wheresql Where conditions for the SQL param: string|null $sortsql Order by conditions for the SQL param: int|null $userid The user ID return: string |
from_db_records(array $results) X-Ref |
Convert the DB records into discussion entities. param: array $results The DB records return: discussion_entity[] |
get_all_discussions_in_forum(forum_entity $forum, string $sort = null) X-Ref |
Get all discussions in the specified forum. param: forum_entity $forum return: array |
get_first_discussion_in_forum(forum_entity $forum) X-Ref |
Get the first discussion in the specified forum. param: forum_entity $forum return: discussion_entity|null |
get_last_discussion_in_forum(forum_entity $forum) X-Ref |
Get the last discussion in the specified forum. param: forum_entity $forum return: discussion_entity|null |
get_count_discussions_in_forum(forum_entity $forum) X-Ref |
Get the count of the discussions in the specified forum. param: forum_entity $forum return: int |
update_discussion(discussion_entity $discussion) X-Ref |
Update the discussion param: discussion_entity $discussion return: discussion_entity|null |