com.lokorin.lokorin.lib
[ class tree: com.lokorin.lokorin.lib ] [ index: com.lokorin.lokorin.lib ] [ all elements ]

Class: ReadOnly

Source Location: /_includes/lib_forms.php

Class Overview

Field
   |
   --ReadOnly

Describes a field that is read only. I.e. just prints the contents of it, not really a field, but it's useful at times.


Author(s):

  • Andreas Launila

Variables

Methods


Inherited Variables

Inherited Methods

Class: Field

Field::__construct()
Constructor for Field.
Field::clear()
Clears the field, making it so that it appears to never have received a value.
Field::formatAddition()
Formats any additional data that should be appended to the field. Any '%id' entities in the formatted string are replaced with the field's id. Any '%name' entities in the formatted string are replaced with the field's name.
Field::getAsHtml()
Returns the (X)HTML representation of the field. This function should be concidered as an abstract function, any subclasses should override this.
Field::getAttributes()
Gets the (X)HTML information containing all base information.
Field::getError()
Field::getId()
Gets the field's id.
Field::getName()
Gets the name of the field.
Field::getValue()
Gets the value of the field.
Field::hasUserValue()
Checks if the field has a non empty value that has been supplied by a user.
Field::hasValue()
Checks if the field has a non empty value.
Field::isValid()
Field::setAttribute()
Sets one of the firleds attributes. If the attribute does not exist then it is created. The attributes 'id', 'name' and 'value' can not be modified throught this function.
Field::setId()
Sets the field's id.
Field::setValue()
Sets the value of the field.

Class Details

[line 273]
Describes a field that is read only. I.e. just prints the contents of it, not really a field, but it's useful at times.



Tags:

author:  Andreas Launila


[ Top ]


Class Variables

$callback =

[line 279]

A callback that the value should be processed through before being displayed. An empty string means that there is no callback.



Tags:

access:  private

Type:   callback


[ Top ]



Class Methods


constructor __construct [line 290]

ReadOnly __construct( string $name, [string $value = ''], [callback $formatCallback = ''])

Constructor for ReadOnly.



Tags:

access:  public


Overrides Field::__construct() (Constructor for Field.)

Parameters:

string   $name   The name of the read only field.
string   $value   The value to display.
callback   $formatCallback   A callback that should be applied to the value before displaying it. The callback should take one argument, the value, and return the string that should be displayed instead of the value.

[ Top ]

method getAsHtml [line 299]

void getAsHtml( )



Tags:

access:  public
see:  Field.getAsHtml()


Overrides Field::getAsHtml() (Returns the (X)HTML representation of the field. This function should be concidered as an abstract function, any subclasses should override this.)

[ Top ]


Documentation generated on Sun, 16 Apr 2006 21:03:29 +0200 by phpDocumentor 1.3.0RC4