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

Class: HTML_QuickForm2_Container_Repeat_JavascriptBuilder

Source Location: /HTML_QuickForm2-2.0.2/HTML/QuickForm2/Container/Repeat.php

Class Overview

HTML_QuickForm2_JavascriptBuilder
   |
   --HTML_QuickForm2_Container_Repeat_JavascriptBuilder

Javascript builder used when rendering a repeat prototype


Author(s):

Version:

  • Release: 2.0.2

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm2_JavascriptBuilder

HTML_QuickForm2_JavascriptBuilder::__construct()
Constructor, sets default web path to JS library files and default filesystem path
HTML_QuickForm2_JavascriptBuilder::addElementJavascript()
Adds element's setup code to form's Javascript
HTML_QuickForm2_JavascriptBuilder::addLibrary()
Adds a Javascript library file to the list
HTML_QuickForm2_JavascriptBuilder::addRule()
Adds the Rule javascript to the list of current form Rules
HTML_QuickForm2_JavascriptBuilder::encode()
Encodes a value for use as Javascript literal
HTML_QuickForm2_JavascriptBuilder::encodeNameValue()
Callback for array_map used to generate name-value pairs
HTML_QuickForm2_JavascriptBuilder::forceValidator()
Enables generating a validator for the current form even if no rules are present
HTML_QuickForm2_JavascriptBuilder::getFormJavascript()
Returns per-form javascript (client-side validation and elements' setup)
HTML_QuickForm2_JavascriptBuilder::getLibraries()
Returns Javascript libraries
HTML_QuickForm2_JavascriptBuilder::getSetupCode()
Returns setup code for form elements
HTML_QuickForm2_JavascriptBuilder::getValidator()
Returns client-side validation code
HTML_QuickForm2_JavascriptBuilder::setFormId()
Sets ID of the form currently being processed
HTML_QuickForm2_JavascriptBuilder::wrapScript()
Wraps the given Javascript code in <script> tags

Class Details

[line 67]
Javascript builder used when rendering a repeat prototype

Instead of returning form setup code and client-side rules as normal Javascript code, it returns them as Javascript string literals. These are expected to be eval()'d when adding a new repeat item.

This class is not intended for normal use.



[ Top ]


Class Variables

$formId =  'repeat'

[line 74]

Fake "current form" ID
  • Access: protected

Type:   string
Overrides:   Array


[ Top ]

$libraries = array()

[line 80]

Empty list of javascript libraries, base one(s) are in original builder
  • Access: protected

Type:   array
Overrides:   Array


[ Top ]



Method Detail

getFormJavascriptAsStrings   [line 88]

array getFormJavascriptAsStrings( )

Returns rules and element setup code as Javascript string literals
  • Return: array('rules', 'setup code')
  • Access: public

[ Top ]

passLibraries   [line 107]

void passLibraries( HTML_QuickForm2_JavascriptBuilder $recipient)

Passes Javascript libraries added by repeat prototype
  • Access: public

Parameters:

HTML_QuickForm2_JavascriptBuilder   $recipient     original Javascript builder

[ Top ]


Documentation generated on Sat, 28 Jun 2014 09:30:28 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.