You are here

function simple_modal_overlay_show in Simple modal overlay 7

Displays the provided content in an overlay.

Parameters

string $title: The translated title for the overlay.

string $content: The content to display in the overlay, as translated text, HTML, or a render array.

boolean $dismissible: Whether or not the user can dismiss the overlay by clicking a close link in the overlay. The default is TRUE.

2 calls to simple_modal_overlay_show()
simple_modal_overlay_example in ./simple_modal_overlay.api.php
A sample of how to invoke a simple modal overlay.
simple_modal_overlay_rules_action in ./simple_modal_overlay.rules.inc
Rules action: displays a message in a simple modal overlay.

File

./simple_modal_overlay.module, line 47
Core code for the "Simple modal overlay" module.

Code

function simple_modal_overlay_show($title, $content, $dismissible = TRUE) {
  $output = theme('simple_modal_overlay', array(
    'title' => $title,
    'content' => $content,
    'dismissible' => $dismissible,
  ));

  // Ensure that JavaScript settings get carried forward with the message
  $output .= _simple_modal_overlay_get_settings_js();

  /* Yup. You can pass anything you want for the second parameter of
   * drupal_set_message (message type) as long as the theme doesn't break.
   */
  drupal_set_message($output, 'simple-overlay');
}