Add template part for hooks, and add logic to properly output hook parameters.

Outputting the signature for hooks works slightly differently in that parameters from the phpdoc are output instead of the actual argument values.