Entity routing documentation need other routes adding

Created on 20 October 2016, about 8 years ago
Updated 9 October 2023, about 1 year ago

Problem/Motivation

As mentioned by @tstoeckler on #2801409: Entity routing via YAML or via a routing provider is ambiguous in docs , the entity routing documentation is out of date:

+++ b/core/lib/Drupal/Core/Entity/entity.api.php
@@ -389,19 +396,21 @@
+ * - \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider provides canonical,
+ *   edit-form, and delete-form routes.

I know this is just being moved, but this is actually incomplete as of now. We also generate add-form, add-page and collection routes.

The edit-form and delete-form routes also appear earlier in the file:

 *   some routing notes. Typical link types are:
 *   - canonical: Default link, either to view (if entities are viewed on their
 *     own pages) or edit the entity.
 *   - delete-form: Confirmation form to delete the entity.
 *   - edit-form: Editing form.
 *   - Other link types specific to your entity type can also be defined.

Proposed resolution

Modify core/lib/Drupal/Core/Entity/entity.api.php to:

a. list the omitted routes in the first part of the code, linking back to @ref define .
b. list the omitted routes, plus short descriptions for them, in the second (actually earlier) part of the code.

Short descriptions to be added:

* add-form: Form to add a new entity.
* add-page: (tbc.) Intermediate page for e.g. choosing what bundle to use for the new entity.
* collection: Page listing entities of this type.

Remaining tasks

  • Confirm the short descriptions for the new routes
  • Update patch
  • Review
  • Commit

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Documentation 

Last updated about 12 hours ago

No maintainer
Created by

🇬🇧United Kingdom jp.stacey

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024