2010-12-14 34 views
0

我已經構建了非節點模塊,並且希望將它與Open Atrium集成爲一項功能。如何將非節點模塊集成到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; 
} 

的功能將出現在功能部分,並啓用時,出現在功能菜單中,無論我在什麼組進一步,這些組將該功能設置爲禁用,但該項仍然出現在菜單中。

任何人都可以對此有所瞭解嗎?

謝謝, Greg。

回答

0

好的,我計算出來:

接入回調應該是「spaces_access_feature」,以及接入參數應該是陣列(「觀看」,「test_feature」);