The exporter factory class used to fetch an instance of the different exporter types.
More...
|
| __construct (legacy_data_mapper_factory $legacydatamapperfactory, manager_factory $managerfactory, url_factory $urlfactory, vault_factory $vaultfactory) |
| Constructor for the exporter factory.
|
|
| get_discussion_exporter (stdClass $user, forum_entity $forum, discussion_entity $discussion, array $groupsbyid=[], array $favouriteids=[]) |
| Construct a new discussion exporter for the specified user and forum discussion.
|
|
| get_discussion_summaries_exporter (stdClass $user, forum_entity $forum, array $discussions, array $groupsbyid=[], array $groupsbyauthorid=[], array $discussionreplycount=[], array $discussionunreadcount=[], array $latestpostids=[], array $postauthorcontextids=[], array $favourites=[], array $latestauthors=[]) |
| Construct a new discussion summaries exporter for the specified user and set of discussions.
|
|
| get_forum_exporter (stdClass $user, forum_entity $forum, ?int $currentgroup) |
| Construct a new forum exporter for the specified user and forum.
|
|
| get_posts_exporter (stdClass $user, forum_entity $forum, discussion_entity $discussion, array $posts, array $authorsbyid=[], array $authorcontextids=[], array $attachmentsbypostid=[], array $groupsbyauthorid=[], post_read_receipt_collection_entity $readreceiptcollection=null, array $tagsbypostid=[], array $ratingbypostid=[], bool $includehtml=false, array $inlineattachmentsbypostid=[]) |
| Construct a new post exporter for the specified user and set of post.
|
|
◆ __construct()
mod_forum\local\factories\exporter::__construct |
( |
legacy_data_mapper_factory | $legacydatamapperfactory, |
|
|
manager_factory | $managerfactory, |
|
|
url_factory | $urlfactory, |
|
|
vault_factory | $vaultfactory ) |
Constructor for the exporter factory.
- Parameters
-
legacy_data_mapper_factory | $legacydatamapperfactory | The factory to fetch a legacy data mapper instance |
manager_factory | $managerfactory | The factory fo fetch a manager instance |
url_factory | $urlfactory | The factory to create urls |
vault_factory | $vaultfactory | The vault factory |
◆ get_discussion_export_structure()
static mod_forum\local\factories\exporter::get_discussion_export_structure |
( |
| ) |
|
|
static |
Fetch the structure of the discussion exporter.
- Return values
-
◆ get_discussion_exporter()
mod_forum\local\factories\exporter::get_discussion_exporter |
( |
stdClass | $user, |
|
|
forum_entity | $forum, |
|
|
discussion_entity | $discussion, |
|
|
array | $groupsbyid = [], |
|
|
array | $favouriteids = [] ) |
Construct a new discussion exporter for the specified user and forum discussion.
- Parameters
-
stdClass | $user | The user viewing the forum |
forum_entity | $forum | The forum being viewed |
discussion_entity | $discussion | The discussion being viewed |
stdClass[] | $groupsbyid | The list of groups in the forum |
- Return values
-
◆ get_discussion_summaries_export_structure()
static mod_forum\local\factories\exporter::get_discussion_summaries_export_structure |
( |
| ) |
|
|
static |
Fetch the structure of the discussion summaries exporter.
- Return values
-
◆ get_discussion_summaries_exporter()
mod_forum\local\factories\exporter::get_discussion_summaries_exporter |
( |
stdClass | $user, |
|
|
forum_entity | $forum, |
|
|
array | $discussions, |
|
|
array | $groupsbyid = [], |
|
|
array | $groupsbyauthorid = [], |
|
|
array | $discussionreplycount = [], |
|
|
array | $discussionunreadcount = [], |
|
|
array | $latestpostids = [], |
|
|
array | $postauthorcontextids = [], |
|
|
array | $favourites = [], |
|
|
array | $latestauthors = [] ) |
Construct a new discussion summaries exporter for the specified user and set of discussions.
- Parameters
-
stdClass | $user | The user viewing the forum |
forum_entity | $forum | The forum being viewed |
discussion_summary_entity[] | $discussions | The set of discussion summaries to export |
stdClass[] | $groupsbyauthorid | The set of groups in an associative array for each author |
stdClass[] | $groupsbyid | The set of groups in the forum in an associative array for each group |
int[] | $discussionreplycount | The number of replies for each discussion |
int[] | $discussionunreadcount | The number of unread posts for each discussion |
int[] | $latestpostids | The latest post id for each discussion |
int[] | $postauthorcontextids | The context ids for the first and last post authors (indexed by author id) |
int[] | $favourites | The list of discussion ids that have been favourited |
- Return values
-
discussion_summaries_exporter | |
◆ get_forum_export_structure()
static mod_forum\local\factories\exporter::get_forum_export_structure |
( |
| ) |
|
|
static |
Fetch the structure of the forum exporter.
- Return values
-
◆ get_forum_exporter()
mod_forum\local\factories\exporter::get_forum_exporter |
( |
stdClass | $user, |
|
|
forum_entity | $forum, |
|
|
?int | $currentgroup ) |
Construct a new forum exporter for the specified user and forum.
- Parameters
-
stdClass | $user | The user viewing the forum |
forum_entity | $forum | The forum being viewed |
int | $currentgroup | The group currently being viewed |
- Return values
-
◆ get_posts_export_structure()
static mod_forum\local\factories\exporter::get_posts_export_structure |
( |
| ) |
|
|
static |
Fetch the structure of the posts exporter.
- Return values
-
◆ get_posts_exporter()
mod_forum\local\factories\exporter::get_posts_exporter |
( |
stdClass | $user, |
|
|
forum_entity | $forum, |
|
|
discussion_entity | $discussion, |
|
|
array | $posts, |
|
|
array | $authorsbyid = [], |
|
|
array | $authorcontextids = [], |
|
|
array | $attachmentsbypostid = [], |
|
|
array | $groupsbyauthorid = [], |
|
|
post_read_receipt_collection_entity | $readreceiptcollection = null, |
|
|
array | $tagsbypostid = [], |
|
|
array | $ratingbypostid = [], |
|
|
bool | $includehtml = false, |
|
|
array | $inlineattachmentsbypostid = [] ) |
Construct a new post exporter for the specified user and set of post.
- Parameters
-
stdClass | $user | The user viewing the forum |
forum_entity | $forum | The forum being viewed |
discussion_entity | $discussion | The discussion that the post is in |
post_entity[] | $posts | The set of posts to be exported |
author_entity[] | $authorsbyid | List of authors indexed by author id |
int[] | $authorcontextids | List of authors context ids indexed by author id |
array | $attachmentsbypostid | List of attachments for each post indexed by post id |
array | $groupsbyauthorid | List of groups for the post authors indexed by author id |
post_read_receipt_collection_entity | null | $readreceiptcollection | Details of read receipts for each post |
array | $tagsbypostid | List of tags for each post indexed by post id |
rating[] | $ratingbypostid | List of ratings for each post indexed by post id |
bool | $includehtml | Include some pre-constructed HTML in the export |
array | $inlineattachmentsbypostid | List of attachments for each post indexed by post id |
- Return values
-
The documentation for this class was generated from the following file:
- mod/forum/classes/local/factories/exporter.php