API page: https://api.drupal.org/api/drupal/core%21modules%21system%21system.api.p...
The Annotations topic should document that some annotation types, which extend the PluginID annotation class, have only a single 'id' key in their annotation. For these, it is possible to use a shorthand annotation:
* @SimplePluginType("id_value")
in place of
* @SimplePluginType(
* 'id' => "id_value"
* )
Task: Add this information to the topic, which is located in the file core/modules/system/system.api.php near the end (although the topic documentation may soon be moved to file core.api.php).
Note that you need to leave a space after the @ sign, as is done in the rest of this documentation.
Comments
Comment #1
undertext commentedHere is the patch with @ ViewsArea annotation as example of shorthand notation.
Comment #2
undertext commentedComment #3
jhodgdonGreat work, thanks!
Oh wait. This is my fault... In annotation we don't use => for array keys, just =. So that needs to be fixed in:
Comment #4
pushpinderchauhan commentedPlease review updated patch, did changes mentioned in #3.
Comment #5
jhodgdonGreat! One more thing that I missed in my previous review (sorry):
I don't think we want a blank line here. The two code blocks and "in place of" are part of the same sentence.
Comment #6
pushpinderchauhan commentedThanks!
Please review updated patch.
Comment #7
jhodgdonGreat! We can't commit patches today until the 8.x to 8.0.x branch conversion is taken care of, but this is ready to go.
Comment #9
jhodgdonThanks again! Committed to 8.0.x.
Comment #11
m1r1k commented