function views_pivot_test_uninstall in Pivot Tables for Views 7
Implements hook_uninstall().
File
- tests/
views_pivot_test/ views_pivot_test.install, line 75 - views_pivot_test.install Contains install hooks.
Code
function views_pivot_test_uninstall() {
// Clean up. This is not necessary for tests, but allows clean reinstall of
// this module using Devel while developing tests.
$query = new EntityFieldQuery();
$query
->entityCondition('entity_type', 'node');
$query
->entityCondition('bundle', 'pivot');
$result = $query
->execute();
if (isset($result['node'])) {
$nodes = entity_load('node', array_keys($result['node']));
foreach ($nodes as $node) {
node_delete($node);
}
}
}