Class Drupal\Core\Entity\Annotation\EntityType has some information in its documentation header about where to get information about how to annotate it:
Entity type plugins use an object-based annotation method, rather than an array-type annotation method (as commonly used on other annotation types). The annotation properties of entity types are found on \Drupal\Core\Entity\EntityType and are accessed using get/set methods defined in \Drupal\Core\Entity\EntityTypeInterface.
Task 1:
The ContentEntityType and ConfigEntityType annotation classes need to have similar documentation added (with links to their own classes/interfaces substituted for the base EntityType classes).
Task 2:
All 3 entity type annotation classes need to have
@ingroup entity_api
added to their documentation headers, so that they'll link to (and be listed on) the Entity API topic page.
Note that this @ingroup and additional documentation needs to go *before* the @Annotation (that always needs to come last in any documentation header).
Comments
Comment #1
er.pushpinderrana CreditAttribution: er.pushpinderrana commented@jhodgdon, Completed Task1 and Task2 from my end. Please review attached patch and share your feedback.
Comment #2
jhodgdonYes, that's what we're looking for!
A couple of things to fix:
a) Documentation lines should never go over 80 characters, so the new docs added to the two Annotation classes need to have their lines rewrapped.
b) I do not think the interface is correct in the Config annotation:
ConfigEntityInterface is the interface for config entities, not config entity types (which apparently do not have their own interface -- they just use \Drupal\Core\Entity\EntityTypeInterface for their get/set methods).
Thanks!
Comment #3
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedThankyou for your valuable feedback.
Followed your tips in this patch, please have a look once.
Comment #4
jhodgdonOh, I just noticed one more thing: The Annotation classes have @see to themselves:
Same for Content one. Those can be taken out.
Oh, I see that was taken from the EntityType annotation class. It should be taken out of that too. There is no point in having a @see link to the same class! :)
The rest looks great, thanks!
Comment #5
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedRemoved @see from all three, please verify.
Comment #6
jhodgdonLooks great! Thanks! Committed to 8.x.
Comment #8
jhodgdon@er.pushpinderrana: There is a new issue that you might be interested in: #2288499: Action plugin classes need more docs links
It is kind of similar to this one in some ways, but a little different. I tried to write up a good summary of what needs to be done... We will have a lot more like it soon, so I was hoping someone would try to follow the tasks there and then we can make the instructions better for the rest of the issues, if they are not clear. So... If you are interested, that would be great! Thanks for all the recent patches too!
Comment #9
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedDefinitely I am interested for rest of issues too, let me assigned #2288499 to me.
Yes I am ready to do work for these issues.
Thank you for your suggestion.