|
13 | 13 | | [addressLine3](#addressline3) | Narrows the query results based on the third address line the addresses have.
|
14 | 14 | | [administrativeArea](#administrativearea) | Narrows the query results based on the administrative areas the addresses belongs to.
|
15 | 15 | | [afterPopulate](#afterpopulate) | Performs any post-population processing on elements.
|
16 |
| -| [allowOwnerDrafts](#allowownerdrafts) | Narrows the query results based on whether the addresses’ owners are drafts. |
17 |
| -| [allowOwnerRevisions](#allowownerrevisions) | Narrows the query results based on whether the addresses’ owners are revisions. |
18 | 16 | | [andNotRelatedTo](#andnotrelatedto) | Narrows the query results to only addresses that are not related to certain other elements.
|
19 | 17 | | [andRelatedTo](#andrelatedto) | Narrows the query results to only addresses that are related to certain other elements.
|
20 | 18 | | [asArray](#asarray) | Causes the query to return matching addresses as arrays of data, rather than [Address](craft5:craft\elements\Address) objects.
|
|
25 | 23 | | [dateUpdated](#dateupdated) | Narrows the query results based on the addresses’ last-updated dates.
|
26 | 24 | | [dependentLocality](#dependentlocality) | Narrows the query results based on the dependent locality the addresses belong to.
|
27 | 25 | | [eagerly](#eagerly) | Causes the query to be used to eager-load results for the query’s source element and any other elements in its collection.
|
28 |
| -| [field](#field) | Narrows the query results based on the field the addresses are contained by. |
29 |
| -| [fieldId](#fieldid) | Narrows the query results based on the field the addresses are contained by, per the fields’ IDs. |
30 | 26 | | [firstName](#firstname) | Narrows the query results based on the first name the addresses have.
|
31 | 27 | | [fixedOrder](#fixedorder) | Causes the query results to be returned in the order specified by [id](#id).
|
32 | 28 | | [fullName](#fullname) | Narrows the query results based on the full name the addresses have.
|
|
43 | 39 | | [orderBy](#orderby) | Determines the order that the addresses should be returned in. (If empty, defaults to `dateCreated DESC, elements.id`.)
|
44 | 40 | | [organization](#organization) | Narrows the query results based on the organization the addresses have.
|
45 | 41 | | [organizationTaxId](#organizationtaxid) | Narrows the query results based on the tax ID the addresses have.
|
46 |
| -| [owner](#owner) | Sets the [ownerId](#ownerid) and [siteId()](https://docs.craftcms.com/api/v5/craft-elements-db-elementquery.html#method-siteid) parameters based on a given element. |
47 |
| -| [ownerId](#ownerid) | Narrows the query results based on the owner element of the addresses, per the owners’ IDs. |
48 | 42 | | [postalCode](#postalcode) | Narrows the query results based on the postal code the addresses belong to.
|
49 | 43 | | [preferSites](#prefersites) | If [unique()](https://docs.craftcms.com/api/v5/craft-elements-db-elementquery.html#method-unique) is set, this determines which site should be selected when querying multi-site elements.
|
50 | 44 | | [prepForEagerLoading](#prepforeagerloading) | Prepares the query for lazy eager loading.
|
51 | 45 | | [prepareSubquery](#preparesubquery) | Prepares the element query and returns its subquery (which determines what elements will be returned).
|
52 |
| -| [primaryOwner](#primaryowner) | Sets the [primaryOwnerId](#primaryownerid) and [siteId()](https://docs.craftcms.com/api/v5/craft-elements-db-elementquery.html#method-siteid) parameters based on a given element. |
53 |
| -| [primaryOwnerId](#primaryownerid) | Narrows the query results based on the primary owner element of the addresses, per the owners’ IDs. |
54 | 46 | | [relatedTo](#relatedto) | Narrows the query results to only addresses that are related to certain other elements.
|
55 | 47 | | [render](#render) | Executes the query and renders the resulting elements using their partial templates.
|
56 | 48 | | [search](#search) | Narrows the query results to only addresses that match a search query.
|
@@ -205,42 +197,6 @@ Performs any post-population processing on elements.
|
205 | 197 |
|
206 | 198 |
|
207 | 199 |
|
208 |
| -#### `allowOwnerDrafts` |
209 |
| - |
210 |
| -Narrows the query results based on whether the addresses’ owners are drafts. |
211 |
| - |
212 |
| - |
213 |
| - |
214 |
| -Possible values include: |
215 |
| - |
216 |
| -| Value | Fetches addresses… |
217 |
| -| - | - |
218 |
| -| `true` | which can belong to a draft. |
219 |
| -| `false` | which cannot belong to a draft. |
220 |
| - |
221 |
| - |
222 |
| - |
223 |
| - |
224 |
| - |
225 |
| - |
226 |
| -#### `allowOwnerRevisions` |
227 |
| - |
228 |
| -Narrows the query results based on whether the addresses’ owners are revisions. |
229 |
| - |
230 |
| - |
231 |
| - |
232 |
| -Possible values include: |
233 |
| - |
234 |
| -| Value | Fetches addresses… |
235 |
| -| - | - |
236 |
| -| `true` | which can belong to a revision. |
237 |
| -| `false` | which cannot belong to a revision. |
238 |
| - |
239 |
| - |
240 |
| - |
241 |
| - |
242 |
| - |
243 |
| - |
244 | 200 | #### `andNotRelatedTo`
|
245 | 201 |
|
246 | 202 | Narrows the query results to only addresses that are not related to certain other elements.
|
@@ -501,73 +457,6 @@ and any other elements in its collection.
|
501 | 457 |
|
502 | 458 |
|
503 | 459 |
|
504 |
| -#### `field` |
505 |
| - |
506 |
| -Narrows the query results based on the field the addresses are contained by. |
507 |
| - |
508 |
| - |
509 |
| - |
510 |
| -Possible values include: |
511 |
| - |
512 |
| -| Value | Fetches addresses… |
513 |
| -| - | - |
514 |
| -| `'foo'` | in a field with a handle of `foo`. |
515 |
| -| `['foo', 'bar']` | in a field with a handle of `foo` or `bar`. |
516 |
| -| a `\craft\elements\db\craft\fields\Matrix` object | in a field represented by the object. |
517 |
| - |
518 |
| - |
519 |
| - |
520 |
| -::: code |
521 |
| -```twig |
522 |
| -{# Fetch addresses in the Foo field #} |
523 |
| -{% set addresses = craft.addresses() |
524 |
| - .field('foo') |
525 |
| - .all() %} |
526 |
| -``` |
527 |
| - |
528 |
| -```php |
529 |
| -// Fetch addresses in the Foo field |
530 |
| -$addresses = \craft\elements\Address::find() |
531 |
| - ->field('foo') |
532 |
| - ->all(); |
533 |
| -``` |
534 |
| -::: |
535 |
| - |
536 |
| - |
537 |
| -#### `fieldId` |
538 |
| - |
539 |
| -Narrows the query results based on the field the addresses are contained by, per the fields’ IDs. |
540 |
| - |
541 |
| - |
542 |
| - |
543 |
| -Possible values include: |
544 |
| - |
545 |
| -| Value | Fetches addresses… |
546 |
| -| - | - |
547 |
| -| `1` | in a field with an ID of 1. |
548 |
| -| `'not 1'` | not in a field with an ID of 1. |
549 |
| -| `[1, 2]` | in a field with an ID of 1 or 2. |
550 |
| -| `['not', 1, 2]` | not in a field with an ID of 1 or 2. |
551 |
| - |
552 |
| - |
553 |
| - |
554 |
| -::: code |
555 |
| -```twig |
556 |
| -{# Fetch addresses in the field with an ID of 1 #} |
557 |
| -{% set addresses = craft.addresses() |
558 |
| - .fieldId(1) |
559 |
| - .all() %} |
560 |
| -``` |
561 |
| - |
562 |
| -```php |
563 |
| -// Fetch addresses in the field with an ID of 1 |
564 |
| -$addresses = \craft\elements\Address::find() |
565 |
| - ->fieldId(1) |
566 |
| - ->all(); |
567 |
| -``` |
568 |
| -::: |
569 |
| - |
570 |
| - |
571 | 460 | #### `firstName`
|
572 | 461 |
|
573 | 462 | Narrows the query results based on the first name the addresses have.
|
@@ -1012,63 +901,6 @@ $addresses = \craft\elements\Address::find()
|
1012 | 901 | :::
|
1013 | 902 |
|
1014 | 903 |
|
1015 |
| -#### `owner` |
1016 |
| - |
1017 |
| -Sets the [ownerId](#ownerid) and [siteId()](https://docs.craftcms.com/api/v5/craft-elements-db-elementquery.html#method-siteid) parameters based on a given element. |
1018 |
| - |
1019 |
| - |
1020 |
| - |
1021 |
| - |
1022 |
| - |
1023 |
| -::: code |
1024 |
| -```twig |
1025 |
| -{# Fetch addresses created for this entry #} |
1026 |
| -{% set addresses = craft.addresses() |
1027 |
| - .owner(myEntry) |
1028 |
| - .all() %} |
1029 |
| -``` |
1030 |
| - |
1031 |
| -```php |
1032 |
| -// Fetch addresses created for this entry |
1033 |
| -$addresses = \craft\elements\Address::find() |
1034 |
| - ->owner($myEntry) |
1035 |
| - ->all(); |
1036 |
| -``` |
1037 |
| -::: |
1038 |
| - |
1039 |
| - |
1040 |
| -#### `ownerId` |
1041 |
| - |
1042 |
| -Narrows the query results based on the owner element of the addresses, per the owners’ IDs. |
1043 |
| - |
1044 |
| - |
1045 |
| - |
1046 |
| -Possible values include: |
1047 |
| - |
1048 |
| -| Value | Fetches addresses… |
1049 |
| -| - | - |
1050 |
| -| `1` | created for an element with an ID of 1. |
1051 |
| -| `[1, 2]` | created for an element with an ID of 1 or 2. |
1052 |
| - |
1053 |
| - |
1054 |
| - |
1055 |
| -::: code |
1056 |
| -```twig |
1057 |
| -{# Fetch addresses created for an element with an ID of 1 #} |
1058 |
| -{% set addresses = craft.addresses() |
1059 |
| - .ownerId(1) |
1060 |
| - .all() %} |
1061 |
| -``` |
1062 |
| - |
1063 |
| -```php |
1064 |
| -// Fetch addresses created for an element with an ID of 1 |
1065 |
| -$addresses = \craft\elements\Address::find() |
1066 |
| - ->ownerId(1) |
1067 |
| - ->all(); |
1068 |
| -``` |
1069 |
| -::: |
1070 |
| - |
1071 |
| - |
1072 | 904 | #### `postalCode`
|
1073 | 905 |
|
1074 | 906 | Narrows the query results based on the postal code the addresses belong to.
|
@@ -1157,63 +989,6 @@ Prepares the element query and returns its subquery (which determines what eleme
|
1157 | 989 |
|
1158 | 990 |
|
1159 | 991 |
|
1160 |
| -#### `primaryOwner` |
1161 |
| - |
1162 |
| -Sets the [primaryOwnerId](#primaryownerid) and [siteId()](https://docs.craftcms.com/api/v5/craft-elements-db-elementquery.html#method-siteid) parameters based on a given element. |
1163 |
| - |
1164 |
| - |
1165 |
| - |
1166 |
| - |
1167 |
| - |
1168 |
| -::: code |
1169 |
| -```twig |
1170 |
| -{# Fetch addresses created for this entry #} |
1171 |
| -{% set addresses = craft.addresses() |
1172 |
| - .primaryOwner(myEntry) |
1173 |
| - .all() %} |
1174 |
| -``` |
1175 |
| - |
1176 |
| -```php |
1177 |
| -// Fetch addresses created for this entry |
1178 |
| -$addresses = \craft\elements\Address::find() |
1179 |
| - ->primaryOwner($myEntry) |
1180 |
| - ->all(); |
1181 |
| -``` |
1182 |
| -::: |
1183 |
| - |
1184 |
| - |
1185 |
| -#### `primaryOwnerId` |
1186 |
| - |
1187 |
| -Narrows the query results based on the primary owner element of the addresses, per the owners’ IDs. |
1188 |
| - |
1189 |
| - |
1190 |
| - |
1191 |
| -Possible values include: |
1192 |
| - |
1193 |
| -| Value | Fetches addresses… |
1194 |
| -| - | - |
1195 |
| -| `1` | created for an element with an ID of 1. |
1196 |
| -| `[1, 2]` | created for an element with an ID of 1 or 2. |
1197 |
| - |
1198 |
| - |
1199 |
| - |
1200 |
| -::: code |
1201 |
| -```twig |
1202 |
| -{# Fetch addresses created for an element with an ID of 1 #} |
1203 |
| -{% set addresses = craft.addresses() |
1204 |
| - .primaryOwnerId(1) |
1205 |
| - .all() %} |
1206 |
| -``` |
1207 |
| - |
1208 |
| -```php |
1209 |
| -// Fetch addresses created for an element with an ID of 1 |
1210 |
| -$addresses = \craft\elements\Address::find() |
1211 |
| - ->primaryOwnerId(1) |
1212 |
| - ->all(); |
1213 |
| -``` |
1214 |
| -::: |
1215 |
| - |
1216 |
| - |
1217 | 992 | #### `relatedTo`
|
1218 | 993 |
|
1219 | 994 | Narrows the query results to only addresses that are related to certain other elements.
|
|
0 commit comments