function hook_domain_insert in Domain Access 7.3
Notify other modules that we have created a new domain.
Parameters
$domain: The domain record taken from {domain}, as an array.
$form_values: The form values processed by the form. Note that these are not editable since module_invoke_all() cannot pass by reference. They are passed in case some module needs to check the original form input.
Related topics
2 functions implement hook_domain_insert()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- domain_nav_domain_insert in domain_nav/
domain_nav.module - Implements hook_domain_insert()
- domain_test_domain_insert in tests/
domain_test.domain.inc - Implements hook_domain_insert().
1 invocation of hook_domain_insert()
- domain_set_primary_domain in ./
domain.module - Set the primary domain properly, if necessary.
File
- ./
domain.api.php, line 54 - API documentation file.
Code
function hook_domain_insert($domain, $form_values = array()) {
db_insert('mytable')
->fields(array(
'domain_id' => $domain['domain_id'],
'myvar' => 1,
))
->execute();
}