See Release Notes
Long Term Support Release
Author vault class.
Copyright: | 2019 Ryan Wyllie <ryan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 120 lines (4 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
author:: (5 methods):
get_table_alias()
generate_get_records_sql()
from_db_records()
get_authors_for_posts()
get_context_ids_for_author_ids()
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 author entities. param: array $results The DB records return: author_entity[] |
get_authors_for_posts(array $posts) X-Ref |
Get the authors for the given posts. Returns a distinct list of authors indexed by author id. param: post_entity[] $posts The list of posts return: author_entity[] |
get_context_ids_for_author_ids(array $authorids) X-Ref |
Get the context ids for a set of author ids. The results are indexed by the author id. param: int[] $authorids The list of author ids to fetch. return: int[] Results indexed by author id. |