CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
PopupWindow Class Reference

Lightboxed pop-up window with repeat prevention. More...

## Public Member Functions
| __construct ($PopupId, $DB, $UserId=NULL)
| Object constructor. More...
| Initialize ($CountThreshold, $TimeThreshold)
| Initialize pop-up window tracking. More...
| Width ($NewWidth)
| Set the width of the pop-up window. More...
| Height ($NewHeight)
| Set the height of the pop-up window. More...
| Id ()
| Get the integer ID of window. More...
| WillDisplay ()
| Report whether the pop-up window will display if code printing methods are called. More...
| AlwaysDisplay ($Display)
| Sets the flag that forces the pop-up window to display. More...
| PrintHeaderCode ()
| Print header code if appropriate. More...
| PrintBeginContentCode ()
| Print the beginning code wrapper for the pop-up window content section in page body if appropriate. More...
| PrintEndContentCode ()
| Print the ending code wrapper for the pop-up window content section in page body if appropriate. More...

## Detailed Description

Lightboxed pop-up window with repeat prevention.

Definition at line 13 of file PopupWindow.php.

## Constructor & Destructor Documentation

PopupWindow::__construct | ( |  | $PopupId,
|  |  | $DB,
|  |  | $UserId = `NULL`
| ) |  |

Object constructor.

Parameters

  int | $PopupId | Integer ID of pop-up window.
  Database | $DB | Database object to use for storage and retrieval of window information.
  int | $UserId | User ID for repeat prevention. Defaults to NULL, which indicates no user ID is available.

Definition at line 26 of file PopupWindow.php.

References Height(), Id(), and Width().

## Member Function Documentation

PopupWindow::AlwaysDisplay | ( |  | $Display | ) |

Sets the flag that forces the pop-up window to display.

Parameters

  bool | $Display | TRUE to force window to display.

Definition at line 100 of file PopupWindow.php.

PopupWindow::Height | ( |  | $NewHeight | ) |

Set the height of the pop-up window.

This must be called before any code output method.

Parameters

  int | $NewHeight | New pop-up window height setting.

Definition at line 72 of file PopupWindow.php.

Referenced by __construct().

Here is the caller graph for this function:

PopupWindow::Id | ( |  | ) |

Get the integer ID of window.

Returns
  ID value.

Definition at line 81 of file PopupWindow.php.

Referenced by __construct(), and PrintEndContentCode().

Here is the caller graph for this function:

PopupWindow::Initialize | ( |  | $CountThreshold,
|  |  | $TimeThreshold
| ) |  |

Initialize pop-up window tracking.

This must be called before any HTML output.

Parameters

  int | $CountThreshold | Number of times user must been seen before window displays.
  int | $TimeThreshold | Minimum number of seconds from when user was first seen before window displays.

Definition at line 50 of file PopupWindow.php.

PopupWindow::PrintBeginContentCode | ( |  | ) |

Print the beginning code wrapper for the pop-up window content section in page body if appropriate.

Definition at line 134 of file PopupWindow.php.

References PHP.

PopupWindow::PrintEndContentCode | ( |  | ) |

Print the ending code wrapper for the pop-up window content section in page body if appropriate.

Definition at line 149 of file PopupWindow.php.

References Id(), and PHP.

PopupWindow::PrintHeaderCode | ( |  | ) |

Print header code if appropriate.

The header code includes HTML tags for the necessary CSS and JavaScript files

Definition at line 109 of file PopupWindow.php.

References PHP.

PopupWindow::Width | ( |  | $NewWidth | ) |

Set the width of the pop-up window.

This must be called before any code output method.

Parameters

  int | $NewWidth | New pop-up window width setting.

Definition at line 62 of file PopupWindow.php.

Referenced by __construct().

Here is the caller graph for this function:

PopupWindow::WillDisplay | ( |  | ) |

Report whether the pop-up window will display if code printing methods are called.

Returns
  Returns TRUE if window will display.

Definition at line 91 of file PopupWindow.php.

The documentation for this class was generated from the following file:

- lib/ScoutLib/PopupWindow.php