Class TextHighlightExtender

Description

The TextHighlightExtender extender class.

This extender can be used to highlight certain words within a div, span etc. The text is marked with a custom css class, which makes it possible to fully customize the style of the highlighted text.

The extender can be added to the page with the PHP and JavaScript add functions and can then be retrieved with Wigbi.getControl(id).

Note that the extender will not remove any highlighting that were not applied by the extender itself. So, if you apply the extender and after that change the text to one that contains highlighting, the extender will not remove that highlighting.

JAVASCRIPT ********************************

TextHighlightExtender : BaseControl

Properties:

  • public bool caseInsensitive()
  • public void setCaseInsensitive(bool newVal)
  • public string cssClass()
  • public void setCssClass(string newVal)
  • public string elementId()
  • public string[] words()
  • public void setWords(string[] newVal)

Functions:

  • public static void add(string controlId, string elementId, string[] words, string cssClass, bool caseInsensitive)
  • public void highlight(string[] words, string cssClass, bool caseInsensitive)
  • public void refresh()

Located in /wigbi_controls/TextHighlightExtender.php (line 69)

BaseControl
   |
   --TextHighlightExtender
Method Summary
 static void add (string $controlId, string $elementId, array $words, string $cssClass, bool $caseInsensitive)
 TextHighlightExtender __construct ()
Methods
static add (line 190)

Add a TextHighlightExtender extender to the page.

  • access: public
static void add (string $controlId, string $elementId, array $words, string $cssClass, bool $caseInsensitive)
  • string $controlId: The ID of the control.
  • string $elementId: The ID of the target element.
  • array $words: A list of words to highlight.
  • string $cssClass: The CSS class to use for highlighting.
  • bool $caseInsensitive: Whether or not to use case insensitive word matching.
Constructor __construct (line 80)

Create an instance of the extender.

This constructor is only intended to be used by Wigbi at startup.

  • access: public
TextHighlightExtender __construct ()

Redefinition of:
BaseControl::__construct()
Create an instance of the class.

Inherited Methods

Inherited From BaseControl

 BaseControl::__construct()
 BaseControl::closeForm()
 BaseControl::controlId()
 BaseControl::isPostBackSource()
 BaseControl::javaScript()
 BaseControl::openForm()
 BaseControl::registerJavaScript()
 BaseControl::submit()

Documentation generated on Sun, 27 Dec 2009 20:12:07 +0100 by phpDocumentor 1.4.1