PhpExt : [ class tree ] [ index ] [ all elements ]

Class: PhpExt_MessageBox

Source Location: /PhpExt/MessageBox.php

Class PhpExt_MessageBox

Class Overview

Provides attractive and customizable tooltips for any element. The QuickTips singleton is used to configure and manage tooltips globally for multiple elements in a generic manner. To create individual tooltips with maximum customizability, you should consider either Ext.Tip or Ext.ToolTip.

Quicktips can be configured via tag attributes directly in markup, or by registering quick tips programmatically via the register method.

The singleton's instance of Ext.QuickTip is available via getQuickTip, and supports all the methods, and all the all the configuration properties of Ext.QuickTip. These settings will apply to all tooltips shown by the singleton.

Located in /PhpExt/MessageBox.php [line 24]

PhpExt_Object
   |
   --PhpExt_MessageBox

Methods

[ Top ]
Method Summary
static PhpExt_JavascriptStm   alert()   Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt). If a callback function is passed it will be called after the user clicks the button, and the id of the button that was clicked will be passed as the only parameter to the callback (could also be the top-right close button).
static PhpExt_JavascriptStm   CANCEL()   Button config that displays a single Cancel button
static PhpExt_JavascriptStm   confirm()   Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm). If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked will be passed as the only parameter to the callback (could also be the top-right close button).
static PhpExt_JavascriptStm   ERROR()   The CSS class that provides the ERROR icon image
static PhpExt_JavascriptStm   hide()   Hides the message box if it is displayed
static PhpExt_JavascriptStm   INFO()   The CSS class that provides the INFO icon image
static PhpExt_JavascriptStm   OK()   Button config that displays a single OK button
static PhpExt_JavascriptStm   OKCANCEL()   Button config that displays OK and Cancel buttons
static PhpExt_JavascriptStm   progress()   Displays a message box with a progress bar. This message box has no buttons and is not closeable by the user. You are responsible for updating the progress bar as needed via Ext.MessageBox.updateProgress and closing the message box when the process is complete.
static PhpExt_JavascriptStm   prompt()   Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt). The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked (could also be the top-right close button) and the text that was entered will be passed as the two parameters to the callback.
static PhpExt_JavascriptStm   QUESTION()   The CSS class that provides the QUESTION icon image
static PhpExt_JavascriptStm   show()   Displays a new message box, or reinitializes an existing message box, based on the config options passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally, although those calls are basic shortcuts and do not support all of the config options allowed here.
static PhpExt_JavascriptStm   updateProgress()   Updates a progress-style message box's text and progress bar. Only relevant on message boxes initiated via Ext.MessageBox.progress or by calling Ext.MessageBox.show with progress: true.
static PhpExt_JavascriptStm   updateText()   Updates the message box body text
static PhpExt_JavascriptStm   wait()   Displays a message box with an infinitely auto-updating progress bar. This can be used to block user interaction while waiting for a long-running process to complete that does not have defined intervals. You are responsible for closing the message box when the process is complete.
static PhpExt_JavascriptStm   WARNING()   The CSS class that provides the WARNING icon image
static PhpExt_JavascriptStm   YESNO()   Button config that displays Yes and No buttons
static PhpExt_JavascriptStm   YESNOCANCEL()   Button config that displays Yes, No and Cancel buttons
PhpExt_MessageBox   __construct()  

[ Top ]
Methods
static method alert  [line 113]

  static PhpExt_JavascriptStm alert( string $title, string $msg, [PhpExt_JavascriptStm $fn = null], [PhpExt_JavascriptStm $scope = null]  )

Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt). If a callback function is passed it will be called after the user clicks the button, and the id of the button that was clicked will be passed as the only parameter to the callback (could also be the top-right close button).

Parameters:
string   $title:  The title bar text
string   $msg:  The message box body text
PhpExt_JavascriptStm   $fn:  (optional) The callback function invoked after the message box is closed
PhpExt_JavascriptStm   $scope:  (optional) The scope of the callback function

API Tags:
Access:  public


[ Top ]
static method CANCEL  [line 36]

  static PhpExt_JavascriptStm CANCEL( )

Button config that displays a single Cancel button


API Tags:
Access:  public


[ Top ]
static method confirm  [line 133]

  static PhpExt_JavascriptStm confirm( string $title, string $msg, [PhpExt_JavascriptStm $fn = null], [PhpExt_JavascriptStm $scope = null]  )

Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm). If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked will be passed as the only parameter to the callback (could also be the top-right close button).

Parameters:
string   $title:  The title bar text
string   $msg:  The message box body text
PhpExt_JavascriptStm   $fn:  (optional) The callback function invoked after the message box is closed
PhpExt_JavascriptStm   $scope:  (optional) The scope of the callback function

API Tags:
Access:  public


[ Top ]
static method ERROR  [line 44]

  static PhpExt_JavascriptStm ERROR( )

The CSS class that provides the ERROR icon image


API Tags:
Access:  public


[ Top ]
static method hide  [line 151]

  static PhpExt_JavascriptStm hide( )

Hides the message box if it is displayed


API Tags:
Access:  public


[ Top ]
static method INFO  [line 52]

  static PhpExt_JavascriptStm INFO( )

The CSS class that provides the INFO icon image


API Tags:
Access:  public


[ Top ]
static method OK  [line 60]

  static PhpExt_JavascriptStm OK( )

Button config that displays a single OK button


API Tags:
Access:  public


[ Top ]
static method OKCANCEL  [line 68]

  static PhpExt_JavascriptStm OKCANCEL( )

Button config that displays OK and Cancel buttons


API Tags:
Access:  public


[ Top ]
static method progress  [line 164]

  static PhpExt_JavascriptStm progress( string $title, string $msg, [string $progressText = null]  )

Displays a message box with a progress bar. This message box has no buttons and is not closeable by the user. You are responsible for updating the progress bar as needed via Ext.MessageBox.updateProgress and closing the message box when the process is complete.

Parameters:
string   $title:  The title bar text
string   $msg:  The message box body text
string   $progressText:  (optional) The text to display inside the progress bar (defaults to '')

API Tags:
Access:  public


[ Top ]
static method prompt  [line 184]

  static PhpExt_JavascriptStm prompt( string $title, string $msg, [PhpExt_JavascriptStm $fn = null], [PhpExt_JavascriptStm $scope = null], [boolean|int $multiline = null], [string $value = null]  )

Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt). The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked (could also be the top-right close button) and the text that was entered will be passed as the two parameters to the callback.

Parameters:
string   $title:  The title bar text
string   $msg:  The message box body text
PhpExt_JavascriptStm   $fn:  (optional) The callback function invoked after the message box is closed
PhpExt_JavascriptStm   $scope:  (optional) The scope of the callback function
boolean|int   $multiline:  (optional) (optional) True to create a multiline textbox using the defaultTextHeight property, or the height in pixels to create the textbox (defaults to false / single-line)
string   $value:  (optional) (optional) Default value of the text input element (defaults to '')

API Tags:
Access:  public


[ Top ]
static method QUESTION  [line 76]

  static PhpExt_JavascriptStm QUESTION( )

The CSS class that provides the QUESTION icon image


API Tags:
Access:  public


[ Top ]
static method show  [line 220]

  static PhpExt_JavascriptStm show( PhpExt_MessageBoxOptions $options  )

Displays a new message box, or reinitializes an existing message box, based on the config options passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally, although those calls are basic shortcuts and do not support all of the config options allowed here.

Parameters:
PhpExt_MessageBoxOptions   $options:  A MessageBoxOptions object

API Tags:
See:  PhpExt_MessageBoxOptions
Access:  public


[ Top ]
static method updateProgress  [line 233]

  static PhpExt_JavascriptStm updateProgress( float|Javascript_Stm $value, string|Javascript_Stm $progressText, [string $msg = null]  )

Updates a progress-style message box's text and progress bar. Only relevant on message boxes initiated via Ext.MessageBox.progress or by calling Ext.MessageBox.show with progress: true.

Parameters:
float|Javascript_Stm   $value:  Any number between 0 and 1 (e.g., .5, defaults to 0) or a javascript statement
string|Javascript_Stm   $progressText:  The progress text to display inside the progress bar (defaults to '') or a javascript statement
string   $msg:  The message box's body text is replaced with the specified string (defaults to undefined so that any existing body text will not get overwritten by default unless a new value is passed in)

API Tags:
Access:  public


[ Top ]
static method updateText  [line 248]

  static PhpExt_JavascriptStm updateText( [float $text = null]  )

Updates the message box body text

Parameters:
float   $text:  (optional) Replaces the message box element's innerHTML with the specified string (defaults to the XHTML-compliant non-breaking space character ' ')

API Tags:
Access:  public


[ Top ]
static method wait  [line 264]

  static PhpExt_JavascriptStm wait( string $msg, [string $title = null], [PhpExt_ProgressBarWaitConfigObject $config = null]  )

Displays a message box with an infinitely auto-updating progress bar. This can be used to block user interaction while waiting for a long-running process to complete that does not have defined intervals. You are responsible for closing the message box when the process is complete.

Parameters:
string   $msg:  The message box body text
string   $title:  (optional) The title bar text
PhpExt_ProgressBarWaitConfigObject   $config:  (optional) A PhpExt_ProgressBarWaitConfigObject object

API Tags:
Access:  public


[ Top ]
static method WARNING  [line 84]

  static PhpExt_JavascriptStm WARNING( )

The CSS class that provides the WARNING icon image


API Tags:
Access:  public


[ Top ]
static method YESNO  [line 91]

  static PhpExt_JavascriptStm YESNO( )

Button config that displays Yes and No buttons


API Tags:
Access:  public


[ Top ]
static method YESNOCANCEL  [line 98]

  static PhpExt_JavascriptStm YESNOCANCEL( )

Button config that displays Yes, No and Cancel buttons


API Tags:
Access:  public


[ Top ]
Constructor __construct  [line 26]

  PhpExt_MessageBox __construct( )


API Tags:
Access:  protected


Redefinition of:
PhpExt_Object::__construct()

[ Top ]

Documentation generated on Fri, 08 Aug 2008 15:56:49 -0500 by phpDocumentor 1.4.0