og_example.install in Organic groups 7.2
Install, update, and uninstall functions for the OG example module.
File
og_example/og_example.installView source
<?php
/**
* @file
* Install, update, and uninstall functions for the OG example module.
*/
/**
* Implements hook_enable().
*
* Add group audience fields to "Post" node type.
*/
function og_example_enable() {
$og_field = og_fields_info(OG_AUDIENCE_FIELD);
$og_field['field']['settings']['target_type'] = 'node';
// Enable Entity reference prepopulate.
$og_field['instance']['settings']['behaviors']['prepopulate'] = array(
'status' => TRUE,
'action' => 'none',
'fallback' => 'none',
'skip_perm' => FALSE,
);
og_create_field(OG_AUDIENCE_FIELD, 'node', 'post', $og_field);
}
Functions
Name | Description |
---|---|
og_example_enable | Implements hook_enable(). |