Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ This would render **plugins/Users/templates/UserDetails/custom_file.php**

## Content Type Negotiation

`method` Cake\\Controller\\Controller::**addViewClasses**()
`method` Cake\\Controller\\Controller::**addViewClasses**(array $viewClasses)

Controllers can define a list of view classes they support. After the
controller's action is complete CakePHP will use the view list to perform
Expand Down
2 changes: 1 addition & 1 deletion docs/en/core-libraries/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ $result = Cache::writeMany([

### Cache::add()

`static` Cake\\Cache\\Cache::**add**($key, $value $config = 'default')
`static` Cake\\Cache\\Cache::**add**(string $key, mixed $value, string $config = 'default')

Using `Cache::add()` will let you atomically set a key to a value if the key
does not already exist in the cache. If the key already exists in the cache
Expand Down
2 changes: 1 addition & 1 deletion docs/en/development/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ file extensions

### Routing File Extensions

`static` Cake\\Routing\\RouteBuilder::**extensions**(stringnull $extensions, $merge = true)
`method` Cake\\Routing\\RouteBuilder::**setExtensions**(array|string $extensions)

To handle different file extensions in your URLs, you can define the extensions
using the `Cake\Routing\RouteBuilder::setExtensions()` method:
Expand Down
2 changes: 1 addition & 1 deletion docs/en/orm/entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ see [Exposing Virtual Fields](#exposing-virtual-fields).

## Checking if an Entity Has Been Modified

`method` Cake\\ORM\\Entity::**dirty**($field = null, $dirty = null)
`method` Cake\\ORM\\Entity::**isDirty**(?string $field = null)

You may want to make code conditional based on whether or not fields have
changed in an entity. For example, you may only want to validate fields when
Expand Down
25 changes: 8 additions & 17 deletions docs/en/orm/retrieving-data-and-resultsets.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ways to inspect the data returned by the ORM.

## Getting a Single Entity by Primary Key

`method` Cake\\ORM\\Table::**get**($id, $options = [])
`method` Cake\\ORM\\Table::**get**(mixed $primaryKey, array|string $finder = 'all', CacheInterface|string|null $cache = null, Closure|string|null $cacheKey = null, mixed ...$args)

It is often convenient to load a single entity from the database when editing or
viewing entities and their related data. You can do this by using `get()`:
Expand Down Expand Up @@ -69,26 +69,17 @@ by using the `finder` option:
$article = $articles->get($id, 'translations');
```

The list of options supported by get() are:
The parameters supported by `get()` are:

- `cache` cache config.
- `key` cache key.
- `finder` custom finder function.
- `conditions` provide conditions for the WHERE clause of your query.
- `limit` Set the number of rows you want.
- `offset` Set the page offset you want. You can also use `page` to make
the calculation simpler.
- `contain` define the associations to eager load.
- `fields` limit the fields loaded into the entity. Only loading some fields
can cause entities to behave incorrectly.
- `group` add a GROUP BY clause to your query. This is useful when using
aggregating functions.
- `having` add a HAVING clause to your query.
- `join` define additional custom joins.
- `$primaryKey` The primary key value to look up.
- `$finder` The finder to use. Can be a string finder name or an array of finder name and options.
- `$cache` A cache config name or `CacheInterface` instance to use for read-through caching.
- `$cacheKey` A custom cache key or `Closure` to generate one.
- `...$args` Additional arguments passed to the finder.

## Using Finders to Load Data

`method` Cake\\ORM\\Table::**find**($type, mixed ...$args)
`method` Cake\\ORM\\Table::**find**(string $type = 'all', mixed ...$args)

Before you can work with entities, you'll need to load them. The easiest way to
do this is using the `find()` method. The find method provides a short and
Expand Down
6 changes: 3 additions & 3 deletions docs/en/views/helpers/paginator.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ echo $this->Paginator->meta(['first' => true, 'last' => true]);

#### hasNext()

`method` Cake\\View\\Helper\\PaginatorHelper::**hasNext**(string $model = null)
`method` Cake\\View\\Helper\\PaginatorHelper::**hasNext**()

#### hasPrev()

Expand All @@ -302,7 +302,7 @@ echo $this->Paginator->meta(['first' => true, 'last' => true]);

### Creating a Page Counter

`method` Cake\\View\\Helper\\PaginatorHelper::**counter**(string $format = 'pages', array $options = [])
`method` Cake\\View\\Helper\\PaginatorHelper::**counter**(string $format = 'pages')

Returns a counter string for the paged result set. Using a provided format
string and a number of options you can create localized and application
Expand Down Expand Up @@ -340,7 +340,7 @@ echo $this->Paginator->counter('range');

### Generating Pagination URLs

`method` Cake\\View\\Helper\\PaginatorHelper::**generateUrl**(array $options = [], ?string $model = null, array $url = [], array $urlOptions = [])
`method` Cake\\View\\Helper\\PaginatorHelper::**generateUrl**(array $options = [], array $url = [], array $urlOptions = [])

By default returns a full pagination URL string for use in non-standard contexts
(i.e. JavaScript). :
Expand Down