function system_test_module_implements_alter

Implements hook_module_implements_alter().

File

modules/simpletest/tests/system_test.module, line 609

Code

function system_test_module_implements_alter(&$implementations, $hook) {
    // For BootstrapGetFilenameWebTestCase::testRecursiveRebuilds() to work
    // correctly, this module's hook_schema() implementation cannot be either the
    // first implementation (since that would trigger a potential recursive
    // rebuild before anything is in the drupal_get_schema() cache) or the last
    // implementation (since that would trigger a potential recursive rebuild
    // after the cache is already complete). So put it somewhere in the middle.
    if ($hook == 'schema') {
        $group = $implementations['system_test'];
        unset($implementations['system_test']);
        $count = count($implementations);
        $implementations = array_merge(array_slice($implementations, 0, (int) ($count / 2), TRUE), array(
            'system_test' => $group,
        ), array_slice($implementations, (int) ($count / 2), NULL, TRUE));
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.