Entity factory to create the forum entities.
More...
◆ get_author_from_stdclass()
mod_forum\local\factories\entity::get_author_from_stdclass |
( |
stdClass | $record | ) |
|
Create an author entity from a user record.
- Parameters
-
stdClass | $record | The user record |
- Return values
-
◆ get_discussion_from_stdclass()
mod_forum\local\factories\entity::get_discussion_from_stdclass |
( |
stdClass | $record | ) |
|
Create a discussion entity from an stdClass (legacy dicussion object).
- Parameters
-
stdClass | $record | Discussion record |
- Return values
-
◆ get_discussion_summary_from_stdclass()
mod_forum\local\factories\entity::get_discussion_summary_from_stdclass |
( |
stdClass | $discussion, |
|
|
stdClass | $firstpost, |
|
|
stdClass | $firstpostauthor, |
|
|
stdClass | $latestpostauthor ) |
Create a discussion summary enttiy from stdClasses.
- Parameters
-
stdClass | $discussion | The discussion record |
stdClass | $firstpost | A post record for the first post in the discussion |
stdClass | $firstpostauthor | A user record for the author of the first post |
stdClass | $latestpostauthor | A user record for the author of the latest post in the discussion |
- Return values
-
discussion_summary_entity | |
◆ get_exported_posts_sorter()
mod_forum\local\factories\entity::get_exported_posts_sorter |
( |
| ) |
|
Create a sorter entity to sort exported posts.
- Return values
-
◆ get_forum_from_stdclass()
mod_forum\local\factories\entity::get_forum_from_stdclass |
( |
stdClass | $record, |
|
|
context | $context, |
|
|
stdClass | $coursemodule, |
|
|
stdClass | $course ) |
Create a forum entity from a stdClass (legacy forum object).
- Parameters
-
stdClass | $record | The forum record |
context | $context | The forum module context |
stdClass | $coursemodule | Course module record for the forum |
stdClass | $course | Course the forum belongs to |
- Return values
-
◆ get_post_from_stdclass()
mod_forum\local\factories\entity::get_post_from_stdclass |
( |
stdClass | $record | ) |
|
Create a post entity from an stdClass (legacy post object).
- Parameters
-
stdClass | $record | The post record |
- Return values
-
◆ get_post_read_receipt_collection_from_stdclasses()
mod_forum\local\factories\entity::get_post_read_receipt_collection_from_stdclasses |
( |
array | $records | ) |
|
Create a post read receipt collection entity from a list of read receipt records.
- Parameters
-
array | $records | A list of read receipt records. |
- Return values
-
post_read_receipt_collection_entity | |
◆ get_posts_sorter()
mod_forum\local\factories\entity::get_posts_sorter |
( |
| ) |
|
Create a sorter entity to sort post entities.
- Return values
-
The documentation for this class was generated from the following file: