Skip to content

Commit

Permalink
cms@8c354fc
Browse files Browse the repository at this point in the history
Finish 5.4.9
  • Loading branch information
shinybrad committed Oct 22, 2024
1 parent 500ddfb commit b67466c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 9 deletions.
38 changes: 29 additions & 9 deletions docs/.artifacts/cms/5.x/addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
| [orderBy](#orderby) | Determines the order that the addresses should be returned in. (If empty, defaults to `dateCreated DESC, elements.id`.)
| [organization](#organization) | Narrows the query results based on the organization the addresses have.
| [organizationTaxId](#organizationtaxid) | Narrows the query results based on the tax ID the addresses have.
| [owner](#owner) | Sets the [ownerId](#ownerid) parameter based on a given owner element.
| [ownerId](#ownerid) | Narrows the query results based on the addresses’ owner elements, per their IDs.
| [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.
| [ownerId](#ownerid) | Narrows the query results based on the owner element of the addresses, per the owners’ IDs.
| [postalCode](#postalcode) | Narrows the query results based on the postal code the addresses belong to.
| [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.
| [prepForEagerLoading](#prepforeagerloading) | Prepares the query for lazy eager loading.
Expand Down Expand Up @@ -209,6 +209,8 @@ Performs any post-population processing on elements.

Narrows the query results based on whether the addresses’ owners are drafts.



Possible values include:

| Value | Fetches addresses…
Expand All @@ -219,10 +221,14 @@ Possible values include:





#### `allowOwnerRevisions`

Narrows the query results based on whether the addresses’ owners are revisions.



Possible values include:

| Value | Fetches addresses…
Expand All @@ -233,6 +239,8 @@ Possible values include:





#### `andNotRelatedTo`

Narrows the query results to only addresses that are not related to certain other elements.
Expand Down Expand Up @@ -497,13 +505,15 @@ and any other elements in its collection.

Narrows the query results based on the field the addresses are contained by.



Possible values include:

| Value | Fetches addresses…
| - | -
| `'foo'` | in a field with a handle of `foo`.
| `['foo', 'bar']` | in a field with a handle of `foo` or `bar`.
| an `\craft\elements\db\craft\fields\Addresses` object | in a field represented by the object.
| a `\craft\elements\db\craft\fields\Matrix` object | in a field represented by the object.



Expand All @@ -528,6 +538,8 @@ $addresses = \craft\elements\Address::find()

Narrows the query results based on the field the addresses are contained by, per the fields’ IDs.



Possible values include:

| Value | Fetches addresses…
Expand Down Expand Up @@ -1002,30 +1014,34 @@ $addresses = \craft\elements\Address::find()

#### `owner`

Sets the [ownerId](#ownerid) parameter based on a given owner element.
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.





::: code
```twig
{# Fetch addresses for the current user #}
{# Fetch addresses created for this entry #}
{% set addresses = craft.addresses()
.owner(currentUser)
.owner(myEntry)
.all() %}
```

```php
// Fetch addresses created for the current user
// Fetch addresses created for this entry
$addresses = \craft\elements\Address::find()
->owner(Craft::$app->user->identity)
->owner($myEntry)
->all();
```
:::


#### `ownerId`

Narrows the query results based on the addresses’ owner elements, per their IDs.
Narrows the query results based on the owner element of the addresses, per the owners’ IDs.



Possible values include:

Expand Down Expand Up @@ -1147,6 +1163,8 @@ Sets the [primaryOwnerId](#primaryownerid) and [siteId()](https://docs.craftcms.





::: code
```twig
{# Fetch addresses created for this entry #}
Expand All @@ -1168,6 +1186,8 @@ $addresses = \craft\elements\Address::find()

Narrows the query results based on the primary owner element of the addresses, per the owners’ IDs.



Possible values include:

| Value | Fetches addresses…
Expand Down
20 changes: 20 additions & 0 deletions docs/.artifacts/cms/5.x/entries.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ Performs any post-population processing on elements.

Narrows the query results based on whether the entries’ owners are drafts.



Possible values include:

| Value | Fetches entries…
Expand All @@ -156,10 +158,14 @@ Possible values include:





#### `allowOwnerRevisions`

Narrows the query results based on whether the entries’ owners are revisions.



Possible values include:

| Value | Fetches entries…
Expand All @@ -170,6 +176,8 @@ Possible values include:





#### `ancestorDist`

Narrows the query results to only entries that are up to a certain distance away from the entry specified by [ancestorOf](#ancestorof).
Expand Down Expand Up @@ -799,6 +807,8 @@ $entries = \craft\elements\Entry::find()

Narrows the query results based on the field the entries are contained by.



Possible values include:

| Value | Fetches entries…
Expand Down Expand Up @@ -830,6 +840,8 @@ $entries = \craft\elements\Entry::find()

Narrows the query results based on the field the entries are contained by, per the fields’ IDs.



Possible values include:

| Value | Fetches entries…
Expand Down Expand Up @@ -1244,6 +1256,8 @@ Sets the [ownerId](#ownerid) and [siteId](#siteid) parameters based on a given e





::: code
```twig
{# Fetch entries created for this entry #}
Expand All @@ -1265,6 +1279,8 @@ $entries = \craft\elements\Entry::find()

Narrows the query results based on the owner element of the entries, per the owners’ IDs.



Possible values include:

| Value | Fetches entries…
Expand Down Expand Up @@ -1488,6 +1504,8 @@ Sets the [primaryOwnerId](#primaryownerid) and [siteId](#siteid) parameters base





::: code
```twig
{# Fetch entries created for this entry #}
Expand All @@ -1509,6 +1527,8 @@ $entries = \craft\elements\Entry::find()

Narrows the query results based on the primary owner element of the entries, per the owners’ IDs.



Possible values include:

| Value | Fetches entries…
Expand Down

0 comments on commit b67466c

Please sign in to comment.