Drupal hook_menu 解释 [英] Drupal hook_menu explanation
问题描述
I have been searching the net and i have not found out anywhere that explains the access callback and access arguments for hook_menu. What I think so far is that it controls who can access the module (correct me if I am mistaken).
So can someone explain how hook_menu access callback and access arguments works and how you would go about if you were going to set the module to only administrators or only registered users to see your module.
Also I am working on Drupal-7
I think what you are looking for is provided in an example at http://drupal.org/node/553368.
You are correct, you use the access arguments to identify the access level required to access whatever is mapped from the $item to the callback.
:)
这篇关于Drupal hook_menu 解释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!