You are here

function domain_test_domain_insert in Domain Access 7.3

Implements hook_domain_insert().

Change the sitename value to 'foobar'.

File

tests/domain_test.domain.inc, line 23
Domain hook tests.

Code

function domain_test_domain_insert($domain, $form_values = array()) {
  if ($domain['sitename'] == 'testfoo') {
    db_update('domain')
      ->fields(array(
      'sitename' => 'foobar',
    ))
      ->condition('domain_id', $domain['domain_id'])
      ->execute();
  }
}