In the documentation comment for the Menu Example module, the following sentence needs to be corrected.
In drupal, a route is a path which is returns some response.
drupal is not capitalized; which is returns is not grammatically correct.
The correct sentence is the following one.
In Drupal, a route is a path which returns some response.
Issue fork examples-3466885
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3466885-typo-in-docblock
compare
Comments
Comment #2
avpadernoComment #3
avpadernoComment #5
avpadernoActually, there are more sentences that need to be changed.
There is no need to use two different sentences.
If it contains a path, the path is attached to it.
I am not sure that A route is an entry [in] the Drupal 8's router table which contains a path. makes clear what a route is. I would use a different sentence. I am sure the Drupal documentation describes differently a route.
That sentence seem to say something obvious. If then the focus is the differences between Drupal 7 and Drupal 8, that sentence should be removed, since that is not a difference between Drupal 7 and Drupal 8.
Drupal 7's hook_menu() is now Routing system in Drupal 8. should probably be removed. The rest of the documentation comment should focus on describing what routes are on Drupal 8+.
Since Drupal 7 does not have controllers, that sentence cannot say that the association of a path with a controller is now handled in the routing system.
The only new information given in that sentence is that routes are defined in .routing.yml files.
I do not feel that that is of the form module.routing.yml is a way to say whose filename is
<module_name>.routing.yml, where<module_name>is the module machine name.These sentences are not giving new information. The previous sentence already made clear that a .routing.yml file is necessary to define new routes.
The new information is eventually that a routing file is an important part of a module, but that is not always true: There are modules that do not define new routes.
A routing file is important for a module that defines new routes, but since it was already stated that routes are defined in routing files, there is no need to say they are important for a module.
Comment #6
avpaderno