function hook_rabbit_hole in Rabbit Hole 7.2
Integrate an entity type with Rabbit Hole.
This will automatically add permissions, columns to the entity table, alter the "View" tab (if possible) and add pseudo fields. The only thing that should be left in order to add full integration is to alter the relevant bundle and entity form, and to execute Rabbit Hole when an entity is viewed.
Have a look at how the Rabbit Hole nodes module has been built in order to get a deeper understanding of the integration.
Return value
array You should return an array where the outer key is the name of the module, and the inner keys consist of:
- entity type
- base table
- view path
7 functions implement hook_rabbit_hole()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- rh_bean_rabbit_hole in modules/
rh_bean/ rh_bean.module - Implements hook_rabbit_hole().
- rh_field_collection_rabbit_hole in modules/
rh_field_collection/ rh_field_collection.module - Implements hook_rabbit_hole().
- rh_file_rabbit_hole in modules/
rh_file/ rh_file.module - Implements hook_rabbit_hole().
- rh_node_rabbit_hole in modules/
rh_node/ rh_node.module - Implements hook_rabbit_hole().
- rh_profile2_rabbit_hole in modules/
rh_profile2/ rh_profile2.module - Implements hook_rabbit_hole().
6 invocations of hook_rabbit_hole()
- rabbit_hole_field_extra_fields in ./
rabbit_hole.module - Implements hook_field_extra_fields().
- rabbit_hole_menu_local_tasks_alter in ./
rabbit_hole.module - Implements hook_menu_local_tasks_alter().
- rabbit_hole_permission in ./
rabbit_hole.module - Implements hook_permission().
- rabbit_hole_schema_alter in ./
rabbit_hole.module - Implements hook_schema_alter().
- rabbit_hole_update_7002 in ./
rabbit_hole.install - Change the rh_redirect field from varchar to text.
File
- ./
rabbit_hole.api.php, line 26 - Hooks provided by Rabbit Hole.
Code
function hook_rabbit_hole() {
return array(
'rh_node' => array(
'entity type' => 'node',
'base table' => 'node',
'view path' => 'node/%/view',
),
);
}