Skip to content

ElementQueryCriteria ​

Type
Class
Namespace
craft\mcp
Inherits
craft\mcp\ElementQueryCriteria
Since
5.12.0

View source

Public Methods ​

MethodDescription
apply()
describe()
page()Reads a page and determines continuation before callers filter records by permission.

apply() ​

View source

Arguments ​

  • $query
  • $criteria (array<string,mixed>)

Returns ​

array<string,mixed> – Normalized criteria applied to the query.

describe() ​

View source

Arguments ​

  • $properties (array<string,array<string,mixed>>)

Returns ​

list<array{name: string, type: string, description: string}>

page() ​

Reads a page and determines continuation before callers filter records by permission.

View source

Arguments ​

  • $query
  • $criteria (array<string,mixed>)

Returns ​

array{elements: (\craft\base\ElementInterface|array<string,mixed>)[], limit: int, offset: int, nextOffset: int|null}

Constants ​

ConstantDescription
AssetSchemaProperties
DefaultLimit
EntrySchemaProperties
IntegerOrIntegersSchema
MaxLimit
SchemaProperties
StringOrStringsSchema
UserSchemaProperties