Entity factory.
Copyright: | 2019 Ryan Wyllie <ryan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 258 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
get_forum_from_stdclass(stdClass $record,context $context,stdClass $coursemodule,stdClass $course) X-Ref |
Create a forum entity from a stdClass (legacy forum object). return: forum_entity param: stdClass $record The forum record param: context $context The forum module context param: stdClass $coursemodule Course module record for the forum param: stdClass $course Course the forum belongs to |
get_discussion_from_stdclass(stdClass $record) X-Ref |
Create a discussion entity from an stdClass (legacy dicussion object). return: discussion_entity param: stdClass $record Discussion record |
get_post_from_stdclass(stdClass $record) X-Ref |
Create a post entity from an stdClass (legacy post object). return: post_entity param: stdClass $record The post record |
get_author_from_stdclass(stdClass $record) X-Ref |
Create an author entity from a user record. return: author_entity param: stdClass $record The user record |
get_discussion_summary_from_stdclass(stdClass $discussion,stdClass $firstpost,stdClass $firstpostauthor,stdClass $latestpostauthor) X-Ref |
Create a discussion summary enttiy from stdClasses. return: discussion_summary_entity param: stdClass $discussion The discussion record param: stdClass $firstpost A post record for the first post in the discussion param: stdClass $firstpostauthor A user record for the author of the first post param: stdClass $latestpostauthor A user record for the author of the latest post in the discussion |
get_post_read_receipt_collection_from_stdclasses(array $records) X-Ref |
Create a post read receipt collection entity from a list of read receipt records. return: post_read_receipt_collection_entity param: array $records A list of read receipt records. |
get_posts_sorter() X-Ref |
Create a sorter entity to sort post entities. return: sorter_entity |
get_exported_posts_sorter() X-Ref |
No description |