QueryVars final class
Minn\Blocks\QueryVars · public/minn/src/Minn/Blocks/QueryVars.php · 122 lines
The query variables a Query Loop block's context asks for, the way the reference's build_query_vars_from_query_block builds them (probe query-loop): a viewable post type; stickies only, left out, or ignored; exclusions; a page size and offset for the page asked for; the old category and tag ids and each viewable taxonomy's terms, merged; formats (standard as no format) OR'd, beside the terms in a group of their own; order, orderby, authors (a list, a comma list, or one id), a search, and parents for a hierarchical type.
Public
| static | fromContext(?array $context, int $page, array $sticky, array $site): array# | The query vars a query block's context amounts to.
|
Internals 5
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | sticky(array $query, mixed $setting, array $sticky): array# |
| ||||||
| private | idTerms(array $context): array# | The old categoryIds and tagIds settings as clauses. @param array<string, mixed> $context @return list<array<string, mixed>>
| ||||||
| private | taxonomyTerms(array $context, callable $viewable): array# | Each viewable taxonomy's terms as a clause. @param array<string, mixed> $context @param callable(string): bool $viewable @return list<array<string, mixed>>
| ||||||
| private | formats(array $query, mixed $formats, array $known): array# | The formats asked for (standard, or one the site knows) OR'd; beside other term clauses, AND'd with them as a group.
@return array<string, mixed> | ||||||
| private | author(array $query, mixed $author): array# | Authors: a list or a comma list as author__in, one id as author. @param array<string, mixed> $query @return array<string, mixed>
|
Nothing matches.