overlay.api.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * @file
  4. * Hooks provided by Overlay module.
  5. */
  6. /**
  7. * @addtogroup hooks
  8. * @{
  9. */
  10. /**
  11. * Allow modules to act when an overlay parent window is initialized.
  12. *
  13. * The parent window is initialized when a page is displayed in which the
  14. * overlay might be required to be displayed, so modules can act here if they
  15. * need to take action to accommodate the possibility of the overlay appearing
  16. * within a Drupal page.
  17. */
  18. function hook_overlay_parent_initialize() {
  19. // Add our custom JavaScript.
  20. drupal_add_js(drupal_get_path('module', 'hook') . '/hook-overlay.js');
  21. }
  22. /**
  23. * Allow modules to act when an overlay child window is initialized.
  24. *
  25. * The child window is initialized when a page is displayed from within the
  26. * overlay, so modules can act here if they need to take action to work from
  27. * within the confines of the overlay.
  28. */
  29. function hook_overlay_child_initialize() {
  30. // Add our custom JavaScript.
  31. drupal_add_js(drupal_get_path('module', 'hook') . '/hook-overlay-child.js');
  32. }
  33. /**
  34. * @} End of "addtogroup hooks".
  35. */