Add standard documentation for dispatched events, in the same manner traditional hooks are documented.

At first I thought the module didnt not provide any mechanism to hook, especially after searching the project for traditional hook invocations.

CommentFileSizeAuthor
#2 3063185-document-events.patch1.79 KBdpi

Comments

dpi created an issue. See original summary.

dpi’s picture

Assigned: dpi » Unassigned
Status: Active » Needs review
StatusFileSize
new1.79 KB
  • The file is designed similarly to SMS Frameworks' sms.api.php, which documents a listened event. We've found success with this documentation approach.
  • There are no imports in this file, all references are fully qualified, so that api.php file is copy-pastable
  • Symbols are prefixed with 'My' to indicate there is no magic.
  • New PHP syntax used, doesnt affect sites as file is not runtime.
jasonawant’s picture

strozx’s picture

Hi, I reviewed this and it does explain the usages for dispatched events. RTBC +1

chegor’s picture

RTBC +1

ngkoutsaik’s picture

Status: Needs review » Reviewed & tested by the community

I had the same problem as @dpi while working on another issue. I thought this module did not have events.

In any case, I will mark this RTBC. The documentation is on point.

optimusprime619’s picture

Thank you very much for the clear and concise documentation. One minor nitpick if I may suggest, is that if my_module.services.yml code block could be updated with a services: key at the beginning it would help make end-users' copypastefu game on point.

  • dpi authored a1ec3dd on 8.x-1.x
    Issue #3063185 by dpi: Added API documentation file.
    
colan’s picture

Status: Reviewed & tested by the community » Fixed

#3: Code for that is welcome.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.