diff --git a/docs/.artifacts/commerce/5.x/orders-carts.md b/docs/.artifacts/commerce/5.x/orders-carts.md index 908f9c604..6204ed258 100644 --- a/docs/.artifacts/commerce/5.x/orders-carts.md +++ b/docs/.artifacts/commerce/5.x/orders-carts.md @@ -8,7 +8,6 @@ | Param | Description | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -| [addOrderBy](#addorderby) | Adds additional ORDER BY columns to the query. | [afterPopulate](#afterpopulate) | Performs any post-population processing on elements. | [andRelatedTo](#andrelatedto) | Narrows the query results to only orders that are related to certain other elements. | [asArray](#asarray) | Causes the query to return matching orders as arrays of data, rather than [Order](commerce5:craft\commerce\elements\Order) objects. @@ -24,7 +23,6 @@ | [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. | [email](#email) | Narrows the query results based on the customers’ email addresses. | [expiryDate](#expirydate) | Narrows the query results based on the orders’ expiry dates. -| [fields](#fields) | Returns the list of fields that should be returned by default by [toArray()](https://www.yiiframework.com/doc/api/2.0/yii-base-arrayabletrait#toArray()-detail) when no specific fields are specified. | [fixedOrder](#fixedorder) | Causes the query results to be returned in the order specified by [id](#id). | [gateway](#gateway) | Narrows the query results based on the gateway. | [gatewayId](#gatewayid) | Narrows the query results based on the gateway, per its ID. @@ -85,19 +83,6 @@ -#### `addOrderBy` - -Adds additional ORDER BY columns to the query. - - - - - - - - - - #### `afterPopulate` Performs any post-population processing on elements. @@ -517,45 +502,6 @@ $orders = \craft\commerce\elements\Order::find() ::: -#### `fields` - -Returns the list of fields that should be returned by default by [toArray()](https://www.yiiframework.com/doc/api/2.0/yii-base-arrayabletrait#toArray()-detail) when no specific fields are specified. - -A field is a named element in the returned array by [toArray()](https://www.yiiframework.com/doc/api/2.0/yii-base-arrayabletrait#toArray()-detail). -This method should return an array of field names or field definitions. -If the former, the field name will be treated as an object property name whose value will be used -as the field value. If the latter, the array key should be the field name while the array value should be -the corresponding field definition which can be either an object property name or a PHP callable -returning the corresponding field value. The signature of the callable should be: - -```php -function ($model, $field) { - // return field value -} -``` - -For example, the following code declares four fields: - -- `email`: the field name is the same as the property name `email`; -- `firstName` and `lastName`: the field names are `firstName` and `lastName`, and their - values are obtained from the `first_name` and `last_name` properties; -- `fullName`: the field name is `fullName`. Its value is obtained by concatenating `first_name` - and `last_name`. - -```php -return [ - 'email', - 'firstName' => 'first_name', - 'lastName' => 'last_name', - 'fullName' => function ($model) { - return $model->first_name . ' ' . $model->last_name; - }, -]; -``` - - - - #### `fixedOrder` Causes the query results to be returned in the order specified by [id](#id). diff --git a/docs/.artifacts/commerce/5.x/products-variants.md b/docs/.artifacts/commerce/5.x/products-variants.md index e2645d6d9..eb0f72d6e 100644 --- a/docs/.artifacts/commerce/5.x/products-variants.md +++ b/docs/.artifacts/commerce/5.x/products-variants.md @@ -12,7 +12,6 @@ Product queries support the following parameters: | Param | Description | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -| [addOrderBy](#product-addorderby) | Adds additional ORDER BY columns to the query. | [after](#product-after) | Narrows the query results to only products that were posted on or after a certain date. | [afterPopulate](#product-afterpopulate) | Performs any post-population processing on elements. | [andRelatedTo](#product-andrelatedto) | Narrows the query results to only products that are related to certain other elements. @@ -30,7 +29,6 @@ Product queries support the following parameters: | [defaultWidth](#product-defaultwidth) | Narrows the query results based on the products’ default variant width dimension IDs. | [eagerly](#product-eagerly) | Causes the query to be used to eager-load results for the query’s source element and any other elements in its collection. | [expiryDate](#product-expirydate) | Narrows the query results based on the products’ expiry dates. -| [fields](#product-fields) | Returns the list of fields that should be returned by default by [toArray()](https://www.yiiframework.com/doc/api/2.0/yii-base-arrayabletrait#toArray()-detail) when no specific fields are specified. | [fixedOrder](#product-fixedorder) | Causes the query results to be returned in the order specified by [id](#product-id). | [hasVariant](#product-hasvariant) | Narrows the query results to only products that have certain variants. | [id](#product-id) | Narrows the query results based on the products’ IDs. @@ -69,19 +67,6 @@ Product queries support the following parameters: -

# addOrderBy

- -Adds additional ORDER BY columns to the query. - - - - - - - - - -

# after

Narrows the query results to only products that were posted on or after a certain date. @@ -556,45 +541,6 @@ $products = \craft\commerce\elements\Product::find() ::: -

# fields

- -Returns the list of fields that should be returned by default by [toArray()](https://www.yiiframework.com/doc/api/2.0/yii-base-arrayabletrait#toArray()-detail) when no specific fields are specified. - -A field is a named element in the returned array by [toArray()](https://www.yiiframework.com/doc/api/2.0/yii-base-arrayabletrait#toArray()-detail). -This method should return an array of field names or field definitions. -If the former, the field name will be treated as an object property name whose value will be used -as the field value. If the latter, the array key should be the field name while the array value should be -the corresponding field definition which can be either an object property name or a PHP callable -returning the corresponding field value. The signature of the callable should be: - -```php -function ($model, $field) { - // return field value -} -``` - -For example, the following code declares four fields: - -- `email`: the field name is the same as the property name `email`; -- `firstName` and `lastName`: the field names are `firstName` and `lastName`, and their - values are obtained from the `first_name` and `last_name` properties; -- `fullName`: the field name is `fullName`. Its value is obtained by concatenating `first_name` - and `last_name`. - -```php -return [ - 'email', - 'firstName' => 'first_name', - 'lastName' => 'last_name', - 'fullName' => function ($model) { - return $model->first_name . ' ' . $model->last_name; - }, -]; -``` - - - -

# fixedOrder

Causes the query results to be returned in the order specified by [id](#product-id). diff --git a/docs/.artifacts/commerce/5.x/subscriptions.md b/docs/.artifacts/commerce/5.x/subscriptions.md index 52a1cfee3..5397fa5e5 100644 --- a/docs/.artifacts/commerce/5.x/subscriptions.md +++ b/docs/.artifacts/commerce/5.x/subscriptions.md @@ -8,7 +8,6 @@ | Param | Description | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -| [addOrderBy](#addorderby) | Adds additional ORDER BY columns to the query. | [afterPopulate](#afterpopulate) | Performs any post-population processing on elements. | [andRelatedTo](#andrelatedto) | Narrows the query results to only subscriptions that are related to certain other elements. | [asArray](#asarray) | Causes the query to return matching subscriptions as arrays of data, rather than [Subscription](commerce5:craft\commerce\elements\Subscription) objects. @@ -20,7 +19,6 @@ | [dateSuspended](#datesuspended) | Narrows the query results based on the subscriptions’ suspension date. | [dateUpdated](#dateupdated) | Narrows the query results based on the subscriptions’ last-updated dates. | [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. -| [fields](#fields) | Returns the list of fields that should be returned by default by [toArray()](https://www.yiiframework.com/doc/api/2.0/yii-base-arrayabletrait#toArray()-detail) when no specific fields are specified. | [fixedOrder](#fixedorder) | Causes the query results to be returned in the order specified by [id](#id). | [gatewayId](#gatewayid) | Narrows the query results based on the gateway, per its ID. | [hasStarted](#hasstarted) | Narrows the query results to only subscriptions that have started. @@ -63,19 +61,6 @@ -#### `addOrderBy` - -Adds additional ORDER BY columns to the query. - - - - - - - - - - #### `afterPopulate` Performs any post-population processing on elements. @@ -361,45 +346,6 @@ and any other elements in its collection. -#### `fields` - -Returns the list of fields that should be returned by default by [toArray()](https://www.yiiframework.com/doc/api/2.0/yii-base-arrayabletrait#toArray()-detail) when no specific fields are specified. - -A field is a named element in the returned array by [toArray()](https://www.yiiframework.com/doc/api/2.0/yii-base-arrayabletrait#toArray()-detail). -This method should return an array of field names or field definitions. -If the former, the field name will be treated as an object property name whose value will be used -as the field value. If the latter, the array key should be the field name while the array value should be -the corresponding field definition which can be either an object property name or a PHP callable -returning the corresponding field value. The signature of the callable should be: - -```php -function ($model, $field) { - // return field value -} -``` - -For example, the following code declares four fields: - -- `email`: the field name is the same as the property name `email`; -- `firstName` and `lastName`: the field names are `firstName` and `lastName`, and their - values are obtained from the `first_name` and `last_name` properties; -- `fullName`: the field name is `fullName`. Its value is obtained by concatenating `first_name` - and `last_name`. - -```php -return [ - 'email', - 'firstName' => 'first_name', - 'lastName' => 'last_name', - 'fullName' => function ($model) { - return $model->first_name . ' ' . $model->last_name; - }, -]; -``` - - - - #### `fixedOrder` Causes the query results to be returned in the order specified by [id](#id).