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

Class: Structures_Form_RendererInterface

Source Location: /Structures_Form-0.8.0devel/Form/RendererInterface.php

Class Overview


An interface to enforce consistency among all group elements used in a Structures_Form.


Author(s):

  • Scott Mattocks

Version:

  • 0.8.0devel

Copyright:

  • Copyright 2006 Scott Mattocks

Methods


Inherited Variables

Inherited Methods


Class Details

[line 26]
An interface to enforce consistency among all group elements used in a Structures_Form.

In HTML_QuickForm, all form renderers can extend one base class. In PHP-GTK 2 this is not possible. To maintain consistency, all renderers must implement this interface.

This interface defines methods needed to collect and display form information including errors.

A note contributors: I welcome contributions from others but I will not include any classes in the package that are not accompanied by a complete set of PHPUnit2 unit tests. Also, I am a stickler for documentation. Please make sure that your contributions are fully documented. Docblocks are not enough. There must be inline documentation. Please see Structures/Form.php for an example of what I mean by fully documented.

  • Author: Scott Mattocks
  • Version: 0.8.0devel
  • Copyright: Copyright 2006 Scott Mattocks
  • License: PHP


[ Top ]


Method Detail

render   [line 69]

mixed render( )

Returns the rendered form.

This method should return something inline with the intent of the renderer even if there are no elements in the form. For example, if the renderer is a GtkTable renderer, this method should return a GtkTable no matter what. Of course, it may throw an exception if needed but should not return anything other than a GtkTable. Not even null or void.

  • Return: The rendered form.
  • Access: public

[ Top ]

setElements   [line 46]

void setElements( array $elements)

Sets the elements that make up the form.

The array passed in will be of the form: array(<name> => <element>)

  • Access: public

Parameters:

array   $elements   —  The elements that make up the form.

[ Top ]

setErrors   [line 55]

void setErrors( array $errors)

Sets the errors to be displayed.
  • Access: public

Parameters:

array   $errors   —  An array of error strings.

[ Top ]

setForm   [line 35]

void setForm( Structures_Form $form)

Sets the form.
  • Access: public

Parameters:

object   $form   —  The form.

[ Top ]

setRequiredNote   [line 86]

void setRequiredNote( string $note)

Sets the string to be used as the note indicating what the required symbol means.

The required note does not include the required symbol. It is up to the renderer to append or prepend the required symbol in a way that makes sense for the rendered output.

The required note is controlled by the form to maintain consistency when a single form is rendered in different ways.

  • Access: public

Parameters:

string   $note   —  The required note.

[ Top ]

setRequiredSymbol   [line 103]

void setRequiredSymbol( string $symbol)

Sets the string to be used as the note indicating what the required symbol means.

The required note does not include the required symbol. It is up to the renderer to append or prepend the required symbol in a way that makes sense for the rendered output.

The required symbol is controlled by the form to maintain consistency when a single form is rendered in different ways.

  • Access: public

Parameters:

string   $symbol   —  The required symbol.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:44:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.