Post read receipt collection class.
Copyright: | 2018 Ryan Wyllie <ryan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 121 lines (4 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
post_read_receipt_collection:: (5 methods):
get_table_alias()
generate_get_records_sql()
from_db_records()
get_from_user_id_and_post_ids()
get_from_user_and_posts()
Class: post_read_receipt_collection - X-Ref
Post read receipt collection 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 post_read_receipt_collection entities. param: array $results The DB records return: post_read_receipt_collection |
get_from_user_id_and_post_ids(int $userid, array $postids) X-Ref |
Load the post_read_receipt_collection for the given user and set of posts. param: int $userid Id of the user to load receipts for param: int[] $postids List of post ids to load receipts for return: post_read_receipt_collection |
get_from_user_and_posts(stdClass $user, array $posts) X-Ref |
Load the post_read_receipt_collection for the given user and set of posts. param: stdClass $user The user to load receipts for param: post_entity[] $posts List of posts to load receipts for return: post_read_receipt_collection |