我已经构建了一个非节点模块,我希望将它与Open Atrium集成为一个功能。
我尝试过测试功能,尝试“破解功能,空间和开放式中庭的代码”,因为文档没有涵盖这个主题,我是功能,空间和开放式中庭的新手。 / p>
我使用功能创建了一个功能,然后自定义了信息和模块文件。
信息文件:
core = "6.x"
description = "A test feature"
name = "Test Feature"
package = "Features"
spaces[types][] = "og"
features[][] = ""code here
模块文件:
function test_feature_menu()
{
$items['ftest'] = array(
'title' => 'Test Feature',
'page callback' => 'test_feature_page',
'access callback' => 'spaces_menu_access',
'type' => MENU_NORMAL_ITEM,
'menu_name' => 'features'
);
}
function test_feature_page()
{
$output = 'test';
return $output;
}
此功能会显示在功能部分中,并在启用时显示在功能菜单中,无论我在哪个组中。此外,这些组的功能设置为已禁用,但该项目仍显示在菜单中。
任何人都可以对此有所了解吗?
谢谢, 格雷格。
答案 0 :(得分:0)
好的,我明白了:
访问回调应该是'spaces_access_feature',访问参数应该是数组('view','test_feature');