Create Module Drupal 7 – Part 2
In this tutorial, we will continue Drupal developpement sample of our module called myblock in part 1.
By implementing hook_help(), a module can make documentation available to the user for the module as a whole, or for
specific paths. For our example myblock module let us write this hook below :
It will display “Help” the following in Module details
If we click on help we will have a documentation detail for our drupal module as below :
hook_permission
This hook can supply permissions that the module defines, so that they can be selected on the user permissions page and used to grant or restrict access to actions the module performs. the array access mypage is the link between myblock_menu and myblock_permission.
When module myblock is installed no permissions are in place so we get an unauthorized access to the meny ressource mypage.
When module myblock permissions are allowed so we get an authorized access to the meny ressource mypage.
Hope this tutorial will help you to start in drupal 7 developpement module with more confidence.
Cheers,