1
Drupal的7.12 /有機基團7.x版,1.3Drupal的完成掛鉤(OG)
有誰知道我可以做一個快速捲曲碰到的幾個POST網站瓦爾像組ID,組名,等。當用戶成功創建組時?
我不知道鉤子系統在這種情況下是如何工作的。
Drupal的7.12 /有機基團7.x版,1.3Drupal的完成掛鉤(OG)
有誰知道我可以做一個快速捲曲碰到的幾個POST網站瓦爾像組ID,組名,等。當用戶成功創建組時?
我不知道鉤子系統在這種情況下是如何工作的。
的有機基團被定義爲一個實體在Drupal 7,這樣就可以自定義的模塊中實現hook_entity_insert
到一個成功創建基團反應:
function MYMODULE_entity_insert($entity, $type) {
if ($type == 'group') {
$group_id = $entity->gid;
// Install the Devel module and run the following code to get a full
// breakdown of what's available in the $entity object
dpm($entity);
// Perform your cURL here
}
}
希望幫助
僅供參考,有一整個[Drupal stackexchange](http://drupal.stackexchange.org),你可能會得到更多的關注。 – octern 2012-04-13 04:29:17