@d-skora opened this Pull Request on October 3rd 2014

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.

@mattab commented on October 6th 2014 Member

Hi @d-skora, thanks for PR. I notice the build failed with a php notice.

@d-skora commented on October 6th 2014

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.

@mgazdzik commented on October 20th 2014 Contributor

@mattab - any update on this? Can this be merged into Core before 2.8.1 ?

@mattab commented on October 21st 2014 Member

Thanks for PR!

This Pull Request was closed on October 21st 2014
Powered by GitHub Issue Mirror