【问题标题】:How to integrate a non-node module into Open Atrium as a feature如何将非节点模块作为功能集成到 Open Atrium
【发布时间】:2010-12-14 15:21:25
【问题描述】:

我已经构建了一个非节点模块,我希望将它与 Open Atrium 集成为一项功能。

我尝试了一项测试功能来尝试“破解”功能、空间和开放式中庭的代码,因为文档未涵盖此主题,而且我对功能、空间和开放式中庭不熟悉。

我使用特性创建了一个特性,然后自定义了信息和模块文件。

信息文件:

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;
}

该功能出现在功能部分,启用后,无论我在哪个组中,都会出现在功能菜单中。此外,这些组的功能设置为禁用,但该项目仍显示在菜单中。

有人能解释一下吗?

谢谢, 格雷格。

【问题讨论】:

    标签: drupal-6 module drupal-modules open-atrium


    【解决方案1】:

    好的,我想通了:

    访问回调应该是'spaces_access_feature',访问参数应该是array('view', 'test_feature');

    【讨论】:

      猜你喜欢
      • 2015-10-17
      • 1970-01-01
      • 2021-10-01
      • 2017-09-14
      • 2015-02-06
      • 2021-05-02
      • 2018-08-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多