Document Hook Events for plugin developers #4199

Closed
mattab opened this Issue Oct 7, 2013 · 19 comments

4 participants

@mattab
Piwik Open Source Analytics member

Plugin developers can extend Piwik and change its functionality using Events. Plugins can "listen" to specific events and execute code, and/or read optional parameters and/or modify input parameter object

We shall prepare a documentation, the content will be fetched from the phpdoc comments of each hook.

  • Generated doc will list all hooks and for each:
    • Hook name
    • Link to see the code on github, where the hook is called
    • One sentence description explaining when the hook is called.
    • List the parameters sent with this event, their type
  • The Doc should also contain the list of hooks that do not yet have a phpdoc. This way core developers will know which ones are left to comment.

From a Piwik core team developer point of view, such doc should be automated. The current version was not automated and is not up to date as a result.

From a Plugin Developer point of view, having access to the up to date list of hooks is very important: the list is a clear overview of the possibilities offered by the Piwik platform.

This ticket scope is:

  • Script to generate documentation
  • Document all existing hooks so this doc looks nice and useful
  • Check that Tracker.* hooks make sense and are complete (ie. plugin developers should be able to do anything they want in tracker, using a tracker hook)

See also: Auto generated doc for classes and methods #4194

@tsteur
Piwik Open Source Analytics member

In 73c9b97: refs #4199 inline this event name as we cannot automatically resolve it in hook doc generator

@tsteur
Piwik Open Source Analytics member

In 66de222: refs #4199 the signature will be autogenerated by the hooks doc generator

@tsteur
Piwik Open Source Analytics member

In 7657881: refs #4199 inline the event documentation, renamed $this -> $logger to have a nice signature in documentation

@tsteur
Piwik Open Source Analytics member

In c42bd69: refs #4199 our hooks doc generator supports Markdown

@tsteur
Piwik Open Source Analytics member

In 81f4c9e: refs #4199 inline some more PostEvent doc blocks

@tsteur
Piwik Open Source Analytics member

In 9bfd1ae: refs #4199 documented some events

@tsteur
Piwik Open Source Analytics member

In 3f39037: refs #4199 documented some more events

@tsteur
Piwik Open Source Analytics member

In c2cb040: refs #4199 documented some more events

@tsteur
Piwik Open Source Analytics member

In e73621f: refs #4199 forgot one backtick

@tsteur
Piwik Open Source Analytics member

In 61d5453: refs #4199 added more PostEvent documentations and removed one unused event

@mattab
Piwik Open Source Analytics member

added to scope:

  • Check that Tracker.* hooks make sense and are complete (ie. plugin developers should be able to do anything they want in tracker, using a tracker hook)
@tsteur
Piwik Open Source Analytics member

In e846e35: refs #4199 more event documentations

@tsteur
Piwik Open Source Analytics member

In 4b74c5c: refs #4199 updated some event docs and removed some more unused events

@tsteur
Piwik Open Source Analytics member

In 0c9cf80: refs #4199 added method to get all reports with goal metrics, otherwise it appears twice in the hooks documentation

@tsteur
Piwik Open Source Analytics member

done what is possible so far. Can you have a look over all "@matt" comments?

@tsteur
Piwik Open Source Analytics member

In f76c20a: refs #4199 mark event as internal

@mattab
Piwik Open Source Analytics member

In 60949f6: Refs #4199 minor doc

@anonymous-piwik-user

In 81f5197: refs #4199 ScheduledReports hooks' documentation

@diosmosis
Piwik Open Source Analytics member

In 777ca60: Fixes #4199, revising event docs and closing ticket.

@mattab mattab added this to the 2.0 - Piwik 2.0 milestone Jul 8, 2014
@diosmosis diosmosis was assigned by mattab Jul 8, 2014
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 inline this event name as we cannot automatically resolve …
…it in hook doc generator
73c9b97
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 the signature will be autogenerated by the hooks doc gener…
…ator
66de222
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 inline the event documentation, renamed $this -> $logger t…
…o have a nice signature in documentation
7657881
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 our hooks doc generator supports Markdown c42bd69
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 inline some more PostEvent doc blocks 81f4c9e
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 documented some events 9bfd1ae
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 documented some more events 3f39037
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 documented some more events c2cb040
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 forgot one backtick e73621f
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 added more PostEvent documentations and removed one unused…
… event
61d5453
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 more event documentations e846e35
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 added method to get all reports with goal metrics, otherwi…
…se it appears twice in the hooks documentation
0c9cf80
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@tsteur tsteur refs #4199 mark event as internal f76c20a
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@mattab mattab Refs #4199 minor doc 60949f6
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@julienmoumne julienmoumne refs #4199 ScheduledReports hooks' documentation 81f5197
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
@diosmosis diosmosis Fixes #4199, revising event docs and closing ticket. 777ca60
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment