Skip to content

Commit d5a4230

Browse files
committed
Fix RST => GFM table formatting
Improve some cross reference resolve issues
1 parent 57e82ca commit d5a4230

24 files changed

Lines changed: 268 additions & 402 deletions

File tree

docs/2.x/console-and-shells.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,4 +923,4 @@ This asserts that the generated message IDs are valid and fit to the domain the
923923
- [I18N shell](console-and-shells/i18n-shell)
924924
- [ACL Shell](console-and-shells/acl-shell)
925925
- [Test shell](console-and-shells/testsuite-shell)
926-
- [The upgrade shell will do most of the work to upgrade your CakePHP application](console-and-shells/upgrade-shell)
926+
- [Upgrade shell](console-and-shells/upgrade-shell)

docs/2.x/core-libraries/components/access-control-lists.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,11 @@ Fellowship-\>Hobbits-\>Pippin. Then we see the different permissions
226226
that reside at each of those points, and use the most specific
227227
permission relating to Pippin and the Ale.
228228

229-
| ARO Node | Permission Info | Result |
230-
|-------------------------|------------------|-------------------------|
231-
| Fellowship of the Ring | Deny all | Denying access to ale. |
232-
| ----------------------- | ---------------- | ----------------------- |
233-
| Hobbits | Allow 'ale' | Allowing access to ale! |
234-
| ----------------------- | ---------------- | ----------------------- |
235-
| Pippin | -- | Still allowing ale! |
229+
| ARO Node | Permission Info | Result |
230+
|------------------------|-----------------|-------------------------|
231+
| Fellowship of the Ring | Deny all | Denying access to ale. |
232+
| Hobbits | Allow 'ale' | Allowing access to ale! |
233+
| Pippin | -- | Still allowing ale! |
236234

237235
> [!NOTE]
238236
> Since the 'Pippin' node in the ACL tree doesn't specifically deny
@@ -274,13 +272,11 @@ exception: Merry. To see whether Merry can access the Ale, we'd find his
274272
path in the tree: Fellowship-\>Hobbits-\>Merry. Then we'd work our way down,
275273
keeping track of ale-related permissions:
276274

277-
| ARO Node | Permission Info | Result |
278-
|-------------------------|------------------|-------------------------|
279-
| Fellowship of the Ring | Deny all | Denying access to ale. |
280-
| ----------------------- | ---------------- | ----------------------- |
281-
| Hobbits | Allow 'ale' | Allowing access to ale! |
282-
| ----------------------- | ---------------- | ----------------------- |
283-
| Merry | Deny Ale | Denying ale. |
275+
| ARO Node | Permission Info | Result |
276+
|------------------------|-----------------|-------------------------|
277+
| Fellowship of the Ring | Deny all | Denying access to ale. |
278+
| Hobbits | Allow 'ale' | Allowing access to ale! |
279+
| Merry | Deny Ale | Denying ale. |
284280

285281
## Defining Permissions: CakePHP's INI-based ACL
286282

docs/2.x/development/rest.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,14 @@ The first line sets up a number of default routes for easy REST access while
3232
`parseExtensions()` method specifies the desired result format (e.g. xml,
3333
json, rss). These routes are HTTP Request Method sensitive.
3434

35-
| HTTP format | URL format | Controller action invoked |
36-
|-------------|-----------------------|--------------------------------|
37-
| GET | /recipes.format | RecipesController::index() |
38-
| ----------- | --------------------- | ------------------------------ |
39-
| GET | /recipes/123.format | RecipesController::view(123) |
40-
| ----------- | --------------------- | ------------------------------ |
41-
| POST | /recipes.format | RecipesController::add() |
42-
| ----------- | --------------------- | ------------------------------ |
43-
| POST | /recipes/123.format | RecipesController::edit(123) |
44-
| ----------- | --------------------- | ------------------------------ |
45-
| PUT | /recipes/123.format | RecipesController::edit(123) |
46-
| ----------- | --------------------- | ------------------------------ |
47-
| DELETE | /recipes/123.format | RecipesController::delete(123) |
35+
| HTTP format | URL format | Controller action invoked |
36+
|-------------|---------------------|--------------------------------|
37+
| GET | /recipes.format | RecipesController::index() |
38+
| GET | /recipes/123.format | RecipesController::view(123) |
39+
| POST | /recipes.format | RecipesController::add() |
40+
| POST | /recipes/123.format | RecipesController::edit(123) |
41+
| PUT | /recipes/123.format | RecipesController::edit(123) |
42+
| DELETE | /recipes/123.format | RecipesController::delete(123) |
4843

4944
CakePHP's Router class uses a number of different indicators to
5045
detect the HTTP method being used. Here they are in order of

docs/2.x/models/associations-linking-models-together.md

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,8 @@ belongsTo, and hasAndBelongsToMany (HABTM).
2929
| Relationship | Association Type | Example |
3030
|----|----|----|
3131
| one to one | hasOne | A user has one profile. |
32-
| ------------- | --------------------- | --------------------------------------- |
3332
| one to many | hasMany | A user can have multiple recipes. |
34-
| ------------- | --------------------- | --------------------------------------- |
3533
| many to one | belongsTo | Many recipes belong to a user. |
36-
| ------------- | --------------------- | --------------------------------------- |
3734
| many to many | hasAndBelongsToMany | Recipes have, and belong to, many ingredients. |
3835

3936
To further clarify which way around the associations are defined in the models:
@@ -161,13 +158,11 @@ table will contain a field called user_id. The basic pattern is:
161158

162159
**hasOne:** the *other* model contains the foreign key.
163160

164-
| Relation | Schema |
165-
|----------------------|--------------------|
166-
| Apple hasOne Banana | bananas.apple_id |
167-
| -------------------- | ------------------ |
168-
| User hasOne Profile | profiles.user_id |
169-
| -------------------- | ------------------ |
170-
| Doctor hasOne Mentor | mentors.doctor_id |
161+
| Relation | Schema |
162+
|----------------------|-------------------|
163+
| Apple hasOne Banana | bananas.apple_id |
164+
| User hasOne Profile | profiles.user_id |
165+
| Doctor hasOne Mentor | mentors.doctor_id |
171166

172167
> [!NOTE]
173168
> It is not mandatory to follow CakePHP conventions. You can easily override
@@ -269,13 +264,11 @@ follow this convention:
269264

270265
**belongsTo:** the *current* model contains the foreign key.
271266

272-
| Relation | Schema |
273-
|-------------------------|--------------------|
274-
| Banana belongsTo Apple | bananas.apple_id |
275-
| ----------------------- | ------------------ |
276-
| Profile belongsTo User | profiles.user_id |
277-
| ----------------------- | ------------------ |
278-
| Mentor belongsTo Doctor | mentors.doctor_id |
267+
| Relation | Schema |
268+
|-------------------------|-------------------|
269+
| Banana belongsTo Apple | bananas.apple_id |
270+
| Profile belongsTo User | profiles.user_id |
271+
| Mentor belongsTo Doctor | mentors.doctor_id |
279272

280273
> [!TIP]
281274
> If a model(table) contains a foreign key, it belongsTo the other
@@ -377,12 +370,10 @@ table and name it `image_comment_count`.
377370

378371
Here are some more examples:
379372

380-
| Model | Associated Model | Example |
381-
|----|----|----|
382-
| User | Image | users.image_count |
383-
| ---------- | ----------------------- | ----------------------------------------- |
384-
| Image | ImageComment | images.image_comment_count |
385-
| ---------- | ----------------------- | ----------------------------------------- |
373+
| Model | Associated Model | Example |
374+
|-----------|------------------|---------------------------------------|
375+
| User | Image | users.image_count |
376+
| Image | ImageComment | images.image_comment_count |
386377
| BlogEntry | BlogEntryComment | blog_entries.blog_entry_comment_count |
387378

388379
Once you have added the counter field, you are good to go. Activate
@@ -434,13 +425,11 @@ relation. It is also possible to define a `counterScope` for each `counterCache`
434425
Assuming you have a `User` model and a `Message` model, and you want to be able
435426
to count the amount of read and unread messages for each user.
436427

437-
| Model | Field | Description |
438-
|----|----|----|
439-
| User | users.messages_read | Count read `Message` |
440-
| --------- | ---------------------- | ------------------------------------------- |
441-
| User | users.messages_unread | Count unread `Message` |
442-
| --------- | ---------------------- | ------------------------------------------- |
443-
| Message | messages.is_read | Determines if a `Message` is read or not. |
428+
| Model | Field | Description |
429+
|---------|-----------------------|-------------------------------------------|
430+
| User | users.messages_read | Count read `Message` |
431+
| User | users.messages_unread | Count unread `Message` |
432+
| Message | messages.is_read | Determines if a `Message` is read or not. |
444433

445434
With this setup, your `belongsTo` would look like this:
446435

@@ -468,13 +457,11 @@ this convention:
468457

469458
**hasMany:** the *other* model contains the foreign key.
470459

471-
| Relation | Schema |
472-
|-------------------------|--------------------|
473-
| User hasMany Comment | Comment.user_id |
474-
| ----------------------- | ------------------ |
475-
| Cake hasMany Virtue | Virtue.cake_id |
476-
| ----------------------- | ------------------ |
477-
| Product hasMany Option | Option.product_id |
460+
| Relation | Schema |
461+
|------------------------|-------------------|
462+
| User hasMany Comment | Comment.user_id |
463+
| Cake hasMany Virtue | Virtue.cake_id |
464+
| Product hasMany Option | Option.product_id |
478465

479466
We can define the hasMany association in our User model at
480467
/app/Model/User.php using the string syntax as follows:
@@ -619,9 +606,7 @@ names.
619606
| Relationship | HABTM Table Fields |
620607
|----|----|
621608
| Recipe HABTM Ingredient | **ingredients_recipes**.id, **ingredients_recipes**.ingredient_id, **ingredients_recipes**.recipe_id |
622-
| ------------------------- | ---------------------------------------------------------------- |
623609
| Cake HABTM Fan | **cakes_fans**.id, **cakes_fans**.cake_id, **cakes_fans**.fan_id |
624-
| ------------------------- | ---------------------------------------------------------------- |
625610
| Foo HABTM Bar | **bars_foos**.id, **bars_foos**.foo_id, **bars_foos**.bar_id |
626611

627612
> [!NOTE]

docs/3.x/console-and-shells.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ command. Then learn more about commands:
198198
- [Cache Shell](console-and-shells/cache)
199199
- [I18N Shell](console-and-shells/i18n-shell)
200200
- [Completion Shell](console-and-shells/completion-shell)
201-
- [The plugin shell allows you to load and unload plugins via the command prompt.](console-and-shells/plugin-shell)
201+
- [Plugin Shell](console-and-shells/plugin-shell)
202202
- [Routes Shell](console-and-shells/routes-shell)
203203
- [Schema Cache Shell](console-and-shells/schema-cache)
204204
- [Server Shell](console-and-shells/server-shell)
205-
- [The upgrade shell will do most of the work to upgrade your CakePHP application](console-and-shells/upgrade-shell)
205+
- [Upgrade Shell](console-and-shells/upgrade-shell)
206206
- [Shells](console-and-shells/shells)
207207
- [Interactive Console (REPL)](console-and-shells/repl)
208208

docs/3.x/development/routing.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,19 +1163,14 @@ The first line sets up a number of default routes for easy REST
11631163
access where method specifies the desired result format (e.g. xml,
11641164
json, rss). These routes are HTTP Request Method sensitive.
11651165

1166-
| HTTP format | URL.format | Controller action invoked |
1167-
|-------------|-----------------------|--------------------------------|
1168-
| GET | /recipes.format | RecipesController::index() |
1169-
| ----------- | --------------------- | ------------------------------ |
1170-
| GET | /recipes/123.format | RecipesController::view(123) |
1171-
| ----------- | --------------------- | ------------------------------ |
1172-
| POST | /recipes.format | RecipesController::add() |
1173-
| ----------- | --------------------- | ------------------------------ |
1174-
| PUT | /recipes/123.format | RecipesController::edit(123) |
1175-
| ----------- | --------------------- | ------------------------------ |
1176-
| PATCH | /recipes/123.format | RecipesController::edit(123) |
1177-
| ----------- | --------------------- | ------------------------------ |
1178-
| DELETE | /recipes/123.format | RecipesController::delete(123) |
1166+
| HTTP format | URL.format | Controller action invoked |
1167+
|-------------|---------------------|--------------------------------|
1168+
| GET | /recipes.format | RecipesController::index() |
1169+
| GET | /recipes/123.format | RecipesController::view(123) |
1170+
| POST | /recipes.format | RecipesController::add() |
1171+
| PUT | /recipes/123.format | RecipesController::edit(123) |
1172+
| PATCH | /recipes/123.format | RecipesController::edit(123) |
1173+
| DELETE | /recipes/123.format | RecipesController::delete(123) |
11791174

11801175
The HTTP method being used is detected from a few different sources.
11811176
The sources in order of preference are:

docs/3.x/orm/associations.md

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ to an author. Authors may have many articles and comments. CakePHP makes
66
managing these associations easy. The four association types in CakePHP are:
77
hasOne, hasMany, belongsTo, and belongsToMany.
88

9-
| Relationship | Association Type | Example |
10-
|----|----|----|
11-
| one to one | hasOne | A user has one profile. |
12-
| ------------- | --------------------- | --------------------------------------- |
13-
| one to many | hasMany | A user can have multiple articles. |
14-
| ------------- | --------------------- | --------------------------------------- |
15-
| many to one | belongsTo | Many articles belong to a user. |
16-
| ------------- | --------------------- | --------------------------------------- |
17-
| many to many | belongsToMany | Tags belong to many articles. |
9+
| Relationship | Association Type | Example |
10+
|--------------|------------------|------------------------------------|
11+
| one to one | hasOne | A user has one profile. |
12+
| one to many | hasMany | A user can have multiple articles. |
13+
| many to one | belongsTo | Many articles belong to a user. |
14+
| many to many | belongsToMany | Tags belong to many articles. |
1815

1916
Associations are defined during the `initialize()` method of your table
2017
object. Methods matching the association type allow you to define the
@@ -144,11 +141,10 @@ called 'user_id'. The basic pattern is:
144141

145142
**hasOne:** the *other* model contains the foreign key.
146143

147-
| Relation | Schema |
148-
|------------------------|--------------------|
149-
| Users hasOne Addresses | addresses.user_id |
150-
| ---------------------- | ------------------ |
151-
| Doctors hasOne Mentors | mentors.doctor_id |
144+
| Relation | Schema |
145+
|------------------------|-------------------|
146+
| Users hasOne Addresses | addresses.user_id |
147+
| Doctors hasOne Mentors | mentors.doctor_id |
152148

153149
> [!NOTE]
154150
> It is not mandatory to follow CakePHP conventions, you can override the name
@@ -276,11 +272,10 @@ convention:
276272

277273
**belongsTo:** the *current* model contains the foreign key.
278274

279-
| Relation | Schema |
280-
|---------------------------|--------------------|
281-
| Addresses belongsTo Users | addresses.user_id |
282-
| ------------------------- | ------------------ |
283-
| Mentors belongsTo Doctors | mentors.doctor_id |
275+
| Relation | Schema |
276+
|---------------------------|-------------------|
277+
| Addresses belongsTo Users | addresses.user_id |
278+
| Mentors belongsTo Doctors | mentors.doctor_id |
284279

285280
> [!TIP]
286281
> If a table contains a foreign key, it belongs to the other table.
@@ -366,13 +361,11 @@ convention:
366361

367362
**hasMany:** the *other* model contains the foreign key.
368363

369-
| Relation | Schema |
370-
|----------------------------|----------------------|
371-
| Articles hasMany Comments | Comments.article_id |
372-
| -------------------------- | -------------------- |
373-
| Products hasMany Options | Options.product_id |
374-
| -------------------------- | -------------------- |
375-
| Doctors hasMany Patients | Patients.doctor_id |
364+
| Relation | Schema |
365+
|---------------------------|---------------------|
366+
| Articles hasMany Comments | Comments.article_id |
367+
| Products hasMany Options | Options.product_id |
368+
| Doctors hasMany Patients | Patients.doctor_id |
376369

377370
We can define the hasMany association in our Articles model as follows:
378371

@@ -536,7 +529,6 @@ names.
536529
| Relationship | Join Table Fields |
537530
|----|----|
538531
| Articles belongsToMany Tags | articles_tags.id, articles_tags.tag_id, articles_tags.article_id |
539-
| ------------------------------ | ---------------------------------------------------------------- |
540532
| Patients belongsToMany Doctors | doctors_patients.id, doctors_patients.doctor_id,
541533
doctors_patients.patient_id. |
542534

docs/4.x/console-commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ command. Then learn more about commands:
132132
- [Cache Tool](console-commands/cache)
133133
- [Completion Tool](console-commands/completion)
134134
- [I18N Tool](console-commands/i18n)
135-
- [The plugin tool allows you to load and unload plugins via the command prompt.](console-commands/plugin)
135+
- [Plugin Tool](console-commands/plugin)
136136
- [Schema Cache Tool](console-commands/schema-cache)
137137
- [Routes Tool](console-commands/routes)
138138
- [Server Tool](console-commands/server)

docs/4.x/controllers/components/security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
4.0.0
66
`SecurityComponent` has been deprecated. Use [FormProtection](../../controllers/components/form-protection) instead
7-
for form tampering protection or [Https Enforcer](../../security/https-enforcer) to enforce use of HTTPS (TLS) for requests.
7+
for form tampering protection or [HTTPS Enforcer Middleware](../../security/https-enforcer) to enforce use of HTTPS (TLS) for requests.
88

99
</div>
1010

0 commit comments

Comments
 (0)