simpletest_example.install 645 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * @file
  4. * Install, update and uninstall functions for the simpletest_example module.
  5. */
  6. /**
  7. * Implements hook_install().
  8. *
  9. * @ingroup simpletest_example
  10. */
  11. function simpletest_example_install() {
  12. // Ensure the simpletest_example node type is available.
  13. node_types_rebuild();
  14. $types = node_type_get_types();
  15. node_add_body_field($types['simpletest_example']);
  16. }
  17. /**
  18. * Adds a body field to the simpletest_example node type.
  19. *
  20. * @ingroup simpletest_example
  21. */
  22. function simpletest_example_update_7001() {
  23. node_types_rebuild();
  24. $types = node_type_get_types();
  25. node_add_body_field($types['simpletest_example']);
  26. }