Added @hide annotation.
@hide takes up to one argument.
If there's no argument @hide will always hide the annotated plugin's API.
If the argument is set then there is a API.DocumentGenerator.hide event dispatched.
The event should be handled in the plugin and it should set the &$response to true if the plugin API should be hidden from the current user or false if the user should be able to see the plugin API.
Hi @d-skora, thanks for PR. I notice the build failed with a php notice.
Fixed up things, now it works correctly with classes and methods.
It allows easy future development thanks to using events and provides a quick way to hide API classes or methods.
By using a hide annotation it is possible to hide the API class or method for everyone.
By using a annotation starting with hide it dispatches an event with the same name as the annotation that allows to check if the user should see the API class or method.
A hook for hideExceptForSuperUser annotation is already added in CoreAdminHome class.
@mattab - any update on this? Can this be merged into Core before 2.8.1 ?
Thanks for PR!