Skip to content

Commit

Permalink
cms@31c8d3e
Browse files Browse the repository at this point in the history
Finish 3.9.14
  • Loading branch information
shinybrad committed Dec 19, 2024
1 parent b3779b5 commit 2f49c0e
Show file tree
Hide file tree
Showing 9 changed files with 519 additions and 380 deletions.
54 changes: 0 additions & 54 deletions docs/.artifacts/cms/3.x/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 assets that are related to certain other elements.
| [anyStatus](#anystatus) | Removes element filters based on their statuses.
Expand All @@ -18,7 +17,6 @@
| [dateCreated](#datecreated) | Narrows the query results based on the assets’ creation dates.
| [dateModified](#datemodified) | Narrows the query results based on the assets’ files’ last-modified dates.
| [dateUpdated](#dateupdated) | Narrows the query results based on the assets’ last-updated 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.
| [filename](#filename) | Narrows the query results based on the assets’ filenames.
| [fixedOrder](#fixedorder) | Causes the query results to be returned in the order specified by [id](#id).
| [folderId](#folderid) | Narrows the query results based on the folders the assets belong to, per the folders’ IDs.
Expand Down Expand Up @@ -54,19 +52,6 @@
<!-- textlint-enable -->


#### `addOrderBy`

Adds additional ORDER BY columns to the query.










#### `afterPopulate`

Performs any post-population processing on elements.
Expand Down Expand Up @@ -292,45 +277,6 @@ $assets = \craft\elements\Asset::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;
},
];
```




#### `filename`

Narrows the query results based on the assets’ filenames.
Expand Down
54 changes: 0 additions & 54 deletions docs/.artifacts/cms/3.x/categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
| [ancestorDist](#ancestordist) | Narrows the query results to only categories that are up to a certain distance away from the category specified by [ancestorOf](#ancestorof).
| [ancestorOf](#ancestorof) | Narrows the query results to only categories that are ancestors of another category in its structure.
Expand All @@ -21,7 +20,6 @@
| [dateUpdated](#dateupdated) | Narrows the query results based on the categories’ last-updated dates.
| [descendantDist](#descendantdist) | Narrows the query results to only categories that are up to a certain distance away from the category specified by [descendantOf](#descendantof).
| [descendantOf](#descendantof) | Narrows the query results to only categories that are descendants of another category in its structure.
| [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).
| [group](#group) | Narrows the query results based on the category groups the categories belong to.
| [groupId](#groupid) | Narrows the query results based on the category groups the categories belong to, per the groups’ IDs.
Expand Down Expand Up @@ -58,19 +56,6 @@
<!-- textlint-enable -->


#### `addOrderBy`

Adds additional ORDER BY columns to the query.










#### `afterPopulate`

Performs any post-population processing on elements.
Expand Down Expand Up @@ -391,45 +376,6 @@ This can be combined with [descendantDist](#descendantdist) if you want to limit
:::


#### `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).
Expand Down
58 changes: 58 additions & 0 deletions docs/.artifacts/cms/3.x/config-db.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ Defined by

An array of key => value pairs of PDO attributes to pass into the PDO constructor.

For example, when using the [MySQL PDO driver](https://php.net/manual/en/ref.pdo-mysql.php), if you wanted to enable a SSL database connection
(assuming [SSL is enabled in MySQL](https://dev.mysql.com/doc/mysql-secure-deployment-guide/5.7/en/secure-deployment-secure-connections.html) and `'user'` can connect via SSL,
you’d set these:

```php
[
PDO::MYSQL_ATTR_SSL_KEY => '/path/to/my/client-key.pem',
PDO::MYSQL_ATTR_SSL_CERT => '/path/to/my/client-cert.pem',
PDO::MYSQL_ATTR_SSL_CA => '/path/to/my/ca-cert.pem',
],
```



### `charset`
Expand All @@ -38,6 +50,14 @@ Defined by

The charset to use when creating tables.

::: tip
You can change the character set and collation across all existing database tables using this terminal command:

```bash
> php craft db/convert-charset
```
:::



### `collation`
Expand All @@ -60,6 +80,21 @@ Since

The collation to use when creating tables.

This is only used by MySQL. If null, the [charset’s](https://docs.craftcms.com/api/v3/craft-config-dbconfig.html#property-charset) default collation will be used.

| Charset | Default collation |
| --------- | -------------------- |
| `utf8` | `utf8_general_ci` |
| `utf8mb4` | `utf8mb4_0900_ai_ci` |

::: tip
You can change the character set and collation across all existing database tables using this terminal command:

```bash
> php craft db/convert-charset
```
:::



### `database`
Expand Down Expand Up @@ -117,6 +152,12 @@ Defined by

The Data Source Name (“DSN”) that tells Craft how to connect to the database.

DSNs should begin with a driver prefix (`mysql:` or `pgsql:`), followed by driver-specific parameters.
For example, `mysql:host=127.0.0.1;port=3306;dbname=acme_corp`.

- MySQL parameters: <https://php.net/manual/en/ref.pdo-mysql.connection.php>
- PostgreSQL parameters: <https://php.net/manual/en/ref.pdo-pgsql.connection.php>



### `password`
Expand Down Expand Up @@ -174,6 +215,11 @@ Defined by

The schema that Postgres is configured to use by default (PostgreSQL only).

::: tip
To force Craft to use the specified schema regardless of PostgreSQL’s `search_path` setting, you must enable
the [setSchemaOnConnect](https://docs.craftcms.com/api/v3/craft-config-dbconfig.html#property-setschemaonconnect) setting.
:::



### `server`
Expand Down Expand Up @@ -215,6 +261,11 @@ Since

Whether the [schema](https://docs.craftcms.com/api/v3/craft-config-dbconfig.html#property-schema) should be explicitly used for database queries (PostgreSQL only).

::: warning
This will cause an extra `SET search_path` SQL query to be executed per database connection. Ideally,
PostgreSQL’s `search_path` setting should be configured to prioritize the desired schema.
:::



### `tablePrefix`
Expand Down Expand Up @@ -274,6 +325,8 @@ Defined by

The database connection URL, if one was provided by your hosting environment.

If this is set, the values for [driver](https://docs.craftcms.com/api/v3/craft-config-dbconfig.html#property-driver), [user](https://docs.craftcms.com/api/v3/craft-config-dbconfig.html#property-user), [database](https://docs.craftcms.com/api/v3/craft-config-dbconfig.html#property-database), [server](https://docs.craftcms.com/api/v3/craft-config-dbconfig.html#property-server), [port](https://docs.craftcms.com/api/v3/craft-config-dbconfig.html#property-port), and [database](https://docs.craftcms.com/api/v3/craft-config-dbconfig.html#property-database) will be extracted from it.



### `useUnbufferedConnections`
Expand All @@ -296,6 +349,11 @@ Since

Whether batched queries should be executed on a separate, unbuffered database connection.

This setting only applies to MySQL. It can be enabled when working with high volume content, to prevent
PHP from running out of memory when querying too much data at once. (See
<https://www.yiiframework.com/doc/guide/2.0/en/db-query-builder#batch-query-mysql> for an explanation
of MySQL’s batch query limitations.)



### `user`
Expand Down
Loading

0 comments on commit 2f49c0e

Please sign in to comment.