CWIS Developer Documentation
Public Member Functions | List of all members
PopupWindow Class Reference

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

Public Member Functions

 PopupWindow ($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.

Member Function Documentation

PopupWindow::AlwaysDisplay (   $Display)

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

Parameters
bool$DisplayTRUE to force window to display.

Definition at line 87 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$NewHeightNew pop-up window height setting.

Definition at line 68 of file PopupWindow.php.

Referenced by PopupWindow().

Here is the caller graph for this function:

PopupWindow::Id ( )

Get the integer ID of window.

Returns
ID value.

Definition at line 74 of file PopupWindow.php.

Referenced by PopupWindow(), 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$CountThresholdNumber of times user must been seen before window displays.
int$TimeThresholdMinimum number of seconds from when user was first seen before window displays.

Definition at line 49 of file PopupWindow.php.

PopupWindow::PopupWindow (   $PopupId,
  $DB,
  $UserId = NULL 
)

Object constructor.

Parameters
int$PopupIdInteger ID of pop-up window.
Database$DBDatabase object to use for storage and retrieval of window information.
int$UserIdUser ID for repeat prevention. Defaults to NULL, which indicates no user ID is available.

Definition at line 25 of file PopupWindow.php.

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

PopupWindow::PrintBeginContentCode ( )

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

Definition at line 118 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 133 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 93 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$NewWidthNew pop-up window width setting.

Definition at line 61 of file PopupWindow.php.

Referenced by PopupWindow().

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 81 of file PopupWindow.php.


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