Drupal hook_menu 解释 [英] Drupal hook_menu explanation

查看:16
本文介绍了Drupal hook_menu 解释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆