Query
class Query (View source)
Properties
protected ContentQueryParser | $parser | ||
protected array | $scopes |
Methods
void
QueryScopeInterface|null
getScope(string $name)
No description
Pagerfanta|Content|null
getContent(string $textQuery, array $parameters = [])
getContent based on a 'human readable query'.
Pagerfanta|Content|null
getContentByScope(string $scopeName, string $textQuery, array $parameters = [])
No description
getContentForTwig(string $textQuery, array $parameters = [])
Helper to be called from Twig that is passed via a TwigRecordsView rather than the raw records.
Details
__construct(ContentQueryParser $parser)
void
addScope(string $name, QueryScopeInterface $scope)
QueryScopeInterface|null
getScope(string $name)
Pagerfanta|Content|null
getContent(string $textQuery, array $parameters = [])
getContent based on a 'human readable query'.
Used by the twig command {% setcontent %} but also directly. For reference refer to @link https://docs.bolt.cm/templating/content-fetching
Pagerfanta|Content|null
getContentByScope(string $scopeName, string $textQuery, array $parameters = [])
getContentForTwig(string $textQuery, array $parameters = [])
Helper to be called from Twig that is passed via a TwigRecordsView rather than the raw records.