0
我在寫一個Drupal模塊(filemaker)並定義了一些自定義觸發器。觸發器顯示得很好,但是說'沒有可用的觸發器。「在admin/build/trigger/filemaker。我的自定義Drupal觸發器沒有可用的操作
任何想法如何使我的觸發器的行動可用?
在此先感謝。
/**
* Implementation of hook_hook_info().
*/
function filemaker_hook_info() {
return array(
'filemaker' => array(
'filemaker' => array(
'create' => array(
'runs when' => t('After creating a FileMaker record'),
),
'update' => array(
'runs when' => t('After updating a FileMaker record'),
),
),
),
);
}
/**
* Implementation of hook_filemaker().
*/
function filemaker_filemaker($op, $node) {
$aids = _trigger_get_hook_aids('filemaker', $op);
$context = array(
'hook' => 'filemaker',
'op' => $op,
'node' => $node,
);
actions_do(array_keys($aids), $node, $context);
}
[...]
// Fire off the hook.
module_invoke_all('filemaker', 'create', $node);
[...]