contenido\classes\widgets\class.widgets.nominaltextfield.php

Show: PublicProtectedPrivateinherited
Table of Contents
Project: Contenido Content Management System

Description:

Requirements:

Author
Unknown  
Con_php_req
5.0  
Copyright
four for business AG  
License
http://www.contenido.org/license/LIZENZ.txt  
Link
http://www.4fb.de  
Link
{@internal created $Id: class.widgets.nominaltextfield.php 738 2008-08-27 10:21:19Z timo.trautmann $: }}  
Package
Contenido Backend classes  
Version
1.0  

\cNominalCurrencyField

Package: Default
HTML Textbox
Parent(s)
\cNominalNumberField < \cHTMLTextbox < \cHTMLFormElement < \cHTML < \HTML_Common
Author
Timo A. Hummel  

Properties

>VPropertypublic$_bRealtimeNominalFormat
Details
Type
n/a
>VPropertypublicboolean $_contentlessTag
Details
Type
boolean
Access
private  
Inherited_from
\cHTML::$$_contentlessTag  
Inherited_from
\cHTMLFormElement::$$_contentlessTag  
Inherited_from
\cHTMLTextbox::$$_contentlessTag  
Inherited_from
\cNominalNumberField::$$_contentlessTag  
>VPropertypublic$_oNumber
Details
Type
n/a
>VPropertypublicarray $_requiredScripts
Details
Type
array
Access
private  
Inherited_from
\cHTML::$$_requiredScripts  
Inherited_from
\cHTMLFormElement::$$_requiredScripts  
Inherited_from
\cHTMLTextbox::$$_requiredScripts  
Inherited_from
\cNominalNumberField::$$_requiredScripts  
>VPropertypublicstring $_skeleton_close
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_close  
Inherited_from
\cHTMLFormElement::$$_skeleton_close  
Inherited_from
\cHTMLTextbox::$$_skeleton_close  
Inherited_from
\cNominalNumberField::$$_skeleton_close  
>VPropertypublicstring $_skeleton_open
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_open  
Inherited_from
\cHTMLFormElement::$$_skeleton_open  
Inherited_from
\cHTMLTextbox::$$_skeleton_open  
Inherited_from
\cNominalNumberField::$$_skeleton_open  
>VPropertypublicstring $_skeleton_single
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_single  
Inherited_from
\cHTMLFormElement::$$_skeleton_single  
Inherited_from
\cHTMLTextbox::$$_skeleton_single  
Inherited_from
\cNominalNumberField::$$_skeleton_single  
>VPropertypublicstring $_styledefs
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_styledefs  
Inherited_from
\cHTMLFormElement::$$_styledefs  
Inherited_from
\cHTMLTextbox::$$_styledefs  
Inherited_from
\cNominalNumberField::$$_styledefs  
>VPropertypublicstring $_tag
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_tag  
Inherited_from
\cHTMLFormElement::$$_tag  
Inherited_from
\cHTMLTextbox::$$_tag  
Inherited_from
\cNominalNumberField::$$_tag  

Methods

methodpublic__toString() : string
inherited

Direct call of object as string will return it's generated markup.

Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()\cHTMLTextbox::__toString()\cNominalNumberField::__toString()
Returns
TypeDescription
stringGenerated markup
methodpublic_setContent( $content) : void
Parameters
NameTypeDescription
$content

string/object String with the content or an object to render.

methodpublicaddRequiredScript( $script) : void
Parameters
NameTypeDescription
$script
methodpublicadvanceID() : void
inherited

advances to the next ID available in the system.

Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()\cHTMLTextbox::advanceID()\cNominalNumberField::advanceID()

This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

methodpublicattachEventDefinition( $sName,  $sEvent,  $sCode) : void

Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");

Parameters
NameTypeDescription
$sName

string defines the name of the event

$sEvent

string defines the event (e.g. onClick)

$sCode

string defines the code

methodpublicattachStyleDefinition( $sName,  $sDefinition) : string

This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.

$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");

Results in:

style="border: 1px solid black; white-space: nowrap; padding: 0px;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLTextbox::cHTML()\cNominalNumberField::cHTML()
methodpubliccHTMLFormElement( $name = "",  $id = "",  $disabled = "",  $tabindex = "",  $accesskey = "") : \none

This is a generic form element, where specific elements should be inherited from this class.

Parameters
NameTypeDescription
$name

string Name of the element

$id

string ID of the element

$disabled

string Item disabled flag (non-empty to set disabled)

$tabindex

string Tab index for form elements

$accesskey

string Key to access the field

Returns
TypeDescription
\none
methodpubliccHTMLTextbox( $name,  $initvalue = "",  $width = "",  $maxlength = "",  $id = "",  $disabled = false,  $tabindex = null,  $accesskey = "") : \none

Creates an HTML text box.

If no additional parameters are specified, the default width is 20 units.

Parameters
NameTypeDescription
$name

string Name of the element

$initvalue

string Initial value of the box

$width

int width of the text box

$maxlength

int maximum input length of the box

$id

string ID of the element

$disabled

string Item disabled flag (non-empty to set disabled)

$tabindex

string Tab index for form elements

$accesskey

string Key to access the field

Returns
TypeDescription
\none
methodpubliccNominalCurrencyField( $name,  $initvalue,  $width) : void

Parameters
NameTypeDescription
$name
$initvalue
$width
methodpubliccNominalNumberField( $name,  $initvalue,  $width) : void
Parameters
NameTypeDescription
$name
$initvalue
$width
methodpublicdisableRealtimeNominalFormat() : void

methodpublicenableRealtimeNominalFormat() : void

methodpublicfillCloseSkeleton() : string
Returns
TypeDescription
stringfilled SGML closer skeleton
methodpublicfillSkeleton( $attributes) : string

fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.

Parameters
NameTypeDescription
$attributes

string Attributes to set

Returns
TypeDescription
stringfilled SGML opener skeleton
methodpublicgetID() : string
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string

render(): Alias for toHtml

Returns
TypeDescription
stringRendered HTML
methodpublicsetAccessKey( $accesskey) : \none
Parameters
NameTypeDescription
$accesskey

string The length of the access key. May be A-Z and 0-9.

Returns
TypeDescription
\none
methodpublicsetAlt( $alt) : void
inherited

setAlt: sets the alt and title attributes

Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()\cHTMLTextbox::setAlt()\cNominalNumberField::setAlt()

Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.

To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.

Parameters
NameTypeDescription
$alt

string Text to set as the "alt" attribute

methodpublicsetAttribute( $sAttributeName,  $sValue) : void
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetClass( $class) : void
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContentlessTag( $contentlessTag = true) : void
Parameters
NameTypeDescription
$contentlessTag
methodpublicsetDisabled( $disabled) : \none
inherited

Sets the "disabled" attribute of an element.

Inherited from: \cHTMLFormElement::setDisabled()\cHTMLTextbox::setDisabled()\cNominalNumberField::setDisabled()

User Agents usually are showing the element as "greyed-out".

Example: $obj->setDisabled("disabled"); $obj->setDisabled("");

The first example sets the disabled flag, the second one removes the disabled flag.

Parameters
NameTypeDescription
$disabled

string Sets the disabled-flag if non-empty

Returns
TypeDescription
\none
methodpublicsetEvent( $event,  $action) : void

example: $item->setEvent("change","document.forms[0].submit");

Parameters
NameTypeDescription
$event

string Type of the event

$action

string Function or action to call (JavaScript Code)

methodpublicsetGenerateXHTML(bool $value) : void
Parameters
NameTypeDescription
$valuebool
methodpublicsetID( $id) : void
Parameters
NameTypeDescription
$id
methodpublicsetMaxLength( $maxlen) : \none
inherited

sets the maximum input length of the text box.

Inherited from: \cHTMLTextbox::setMaxLength()\cNominalNumberField::setMaxLength()
Parameters
NameTypeDescription
$maxlen

int maximum input length

Returns
TypeDescription
\none
methodpublicsetStyle( $style) : void
Parameters
NameTypeDescription
$style
methodpublicsetStyleDefinition( $entity,  $definition) : string
Parameters
NameTypeDescription
$entity

string Entity to define

$definition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicsetTabindex( $tabindex) : \none

The tab index needs to be numeric, bigger than 0 and smaller than 32767.

Parameters
NameTypeDescription
$tabindex

int desired tab index

Returns
TypeDescription
\none
methodpublicsetValue( $value) : \none
inherited

sets the initial value of the text box.

Inherited from: \cHTMLTextbox::setValue()\cNominalNumberField::setValue()
Parameters
NameTypeDescription
$value

string Initial value

Returns
TypeDescription
\none
methodpublicsetWidth( $width) : \none
inherited

sets the width of the text box.

Inherited from: \cHTMLTextbox::setWidth()\cNominalNumberField::setWidth()
Parameters
NameTypeDescription
$width

int width of the text box

Returns
TypeDescription
\none
methodpublictoHTML() : void
methodpublictoHtml() : string
inherited

Renders the textbox

Inherited from: \cHTMLTextbox::toHtml()\cNominalNumberField::toHtml()
Returns
TypeDescription
stringRendered HTML
methodpublicunsetEvent( $event) : void

example: $item->unsetEvent("change");

Parameters
NameTypeDescription
$event

string Type of the event

\cNominalNumberField

Package: Default
HTML Textbox
Parent(s)
\cHTMLTextbox < \cHTMLFormElement < \cHTML < \HTML_Common
Children
\cNominalCurrencyField
Author
Timo A. Hummel  

Properties

>VPropertypublic$_aEventDefinitions
inherited
Defines which JS events contain which scripts
Inherited from: \cHTML::$$_aEventDefinitions\cHTMLFormElement::$$_aEventDefinitions\cHTMLTextbox::$$_aEventDefinitions
Details
Type
n/a
Inherited_from
\cHTML::$$_aEventDefinitions  
Inherited_from
\cHTMLFormElement::$$_aEventDefinitions  
Inherited_from
\cHTMLTextbox::$$_aEventDefinitions  
>VPropertypublic$_bRealtimeNominalFormat
Details
Type
n/a
>VPropertypublic$_content
Details
Type
n/a
Inherited_from
\cHTML::$$_content  
Inherited_from
\cHTMLFormElement::$$_content  
Inherited_from
\cHTMLTextbox::$$_content  
>VPropertypublicboolean $_contentlessTag
inherited
Defines if the current tag is a contentless tag
Inherited from: \cHTML::$$_contentlessTag\cHTMLFormElement::$$_contentlessTag\cHTMLTextbox::$$_contentlessTag
Details
Type
boolean
Access
private  
Inherited_from
\cHTML::$$_contentlessTag  
Inherited_from
\cHTMLFormElement::$$_contentlessTag  
Inherited_from
\cHTMLTextbox::$$_contentlessTag  
>VPropertypublic$_oNumber
Details
Type
n/a
>VPropertypublicarray $_requiredScripts
inherited
Defines all scripts which are required by the current element
Inherited from: \cHTML::$$_requiredScripts\cHTMLFormElement::$$_requiredScripts\cHTMLTextbox::$$_requiredScripts
Details
Type
array
Access
private  
Inherited_from
\cHTML::$$_requiredScripts  
Inherited_from
\cHTMLFormElement::$$_requiredScripts  
Inherited_from
\cHTMLTextbox::$$_requiredScripts  
>VPropertypublicstring $_skeleton_close
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_close  
Inherited_from
\cHTMLFormElement::$$_skeleton_close  
Inherited_from
\cHTMLTextbox::$$_skeleton_close  
>VPropertypublicstring $_skeleton_open
inherited
Storage of the open SGML tag template
Inherited from: \cHTML::$$_skeleton_open\cHTMLFormElement::$$_skeleton_open\cHTMLTextbox::$$_skeleton_open
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_open  
Inherited_from
\cHTMLFormElement::$$_skeleton_open  
Inherited_from
\cHTMLTextbox::$$_skeleton_open  
>VPropertypublicstring $_skeleton_single
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_single  
Inherited_from
\cHTMLFormElement::$$_skeleton_single  
Inherited_from
\cHTMLTextbox::$$_skeleton_single  
>VPropertypublicstring $_styledefs
inherited
Defines the style definitions
Inherited from: \cHTML::$$_styledefs\cHTMLFormElement::$$_styledefs\cHTMLTextbox::$$_styledefs
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_styledefs  
Inherited_from
\cHTMLFormElement::$$_styledefs  
Inherited_from
\cHTMLTextbox::$$_styledefs  
>VPropertypublicstring $_tag
inherited
Defines which tag to use
Inherited from: \cHTML::$$_tag\cHTMLFormElement::$$_tag\cHTMLTextbox::$$_tag
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_tag  
Inherited_from
\cHTMLFormElement::$$_tag  
Inherited_from
\cHTMLTextbox::$$_tag  

Methods

methodpublic__toString() : string
inherited

Direct call of object as string will return it's generated markup.

Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()\cHTMLTextbox::__toString()
Returns
TypeDescription
stringGenerated markup
methodpublic_setContent( $content) : void
inherited

_setContent: Sets the content of the object

Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()\cHTMLTextbox::_setContent()
Parameters
NameTypeDescription
$content

string/object String with the content or an object to render.

methodpublicaddRequiredScript( $script) : void
Parameters
NameTypeDescription
$script
methodpublicadvanceID() : void
inherited

advances to the next ID available in the system.

Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()\cHTMLTextbox::advanceID()

This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

methodpublicattachEventDefinition( $sName,  $sEvent,  $sCode) : void
inherited

attachEventDefinition: Attaches the code for an event

Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()\cHTMLTextbox::attachEventDefinition()

Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");

Parameters
NameTypeDescription
$sName

string defines the name of the event

$sEvent

string defines the event (e.g. onClick)

$sCode

string defines the code

methodpublicattachStyleDefinition( $sName,  $sDefinition) : string
inherited

attachStyleDefinition: Attaches a style definition.

Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()\cHTMLTextbox::attachStyleDefinition()

This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.

$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");

Results in:

style="border: 1px solid black; white-space: nowrap; padding: 0px;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLTextbox::cHTML()
methodpubliccHTMLFormElement( $name = "",  $id = "",  $disabled = "",  $tabindex = "",  $accesskey = "") : \none

This is a generic form element, where specific elements should be inherited from this class.

Parameters
NameTypeDescription
$name

string Name of the element

$id

string ID of the element

$disabled

string Item disabled flag (non-empty to set disabled)

$tabindex

string Tab index for form elements

$accesskey

string Key to access the field

Returns
TypeDescription
\none
methodpubliccHTMLTextbox( $name,  $initvalue = "",  $width = "",  $maxlength = "",  $id = "",  $disabled = false,  $tabindex = null,  $accesskey = "") : \none
inherited

Constructor.

Inherited from: \cHTMLTextbox::cHTMLTextbox()

Creates an HTML text box.

If no additional parameters are specified, the default width is 20 units.

Parameters
NameTypeDescription
$name

string Name of the element

$initvalue

string Initial value of the box

$width

int width of the text box

$maxlength

int maximum input length of the box

$id

string ID of the element

$disabled

string Item disabled flag (non-empty to set disabled)

$tabindex

string Tab index for form elements

$accesskey

string Key to access the field

Returns
TypeDescription
\none
methodpubliccNominalNumberField( $name,  $initvalue,  $width) : void

Parameters
NameTypeDescription
$name
$initvalue
$width
methodpublicdisableRealtimeNominalFormat() : void

methodpublicenableRealtimeNominalFormat() : void

methodpublicfillCloseSkeleton() : string
inherited

fillCloseSkeleton: Fills the close skeleton

Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()\cHTMLTextbox::fillCloseSkeleton()
Returns
TypeDescription
stringfilled SGML closer skeleton
methodpublicfillSkeleton( $attributes) : string
inherited

fillSkeleton: Fills the open SGML tag skeleton

Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()\cHTMLTextbox::fillSkeleton()

fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.

Parameters
NameTypeDescription
$attributes

string Attributes to set

Returns
TypeDescription
stringfilled SGML opener skeleton
methodpublicgetID() : string
inherited

getID: returns the current ID

Inherited from: \cHTML::getID()\cHTMLFormElement::getID()\cHTMLTextbox::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string

render(): Alias for toHtml

Returns
TypeDescription
stringRendered HTML
methodpublicsetAccessKey( $accesskey) : \none
inherited

sets the access key for this element.

Inherited from: \cHTMLFormElement::setAccessKey()\cHTMLTextbox::setAccessKey()
Parameters
NameTypeDescription
$accesskey

string The length of the access key. May be A-Z and 0-9.

Returns
TypeDescription
\none
methodpublicsetAlt( $alt) : void
inherited

setAlt: sets the alt and title attributes

Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()\cHTMLTextbox::setAlt()

Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.

To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.

Parameters
NameTypeDescription
$alt

string Text to set as the "alt" attribute

methodpublicsetAttribute( $sAttributeName,  $sValue) : void
inherited

setAttribte: Sets a specific attribute

Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()\cHTMLTextbox::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetClass( $class) : void
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContentlessTag( $contentlessTag = true) : void
Parameters
NameTypeDescription
$contentlessTag
methodpublicsetDisabled( $disabled) : \none
inherited

Sets the "disabled" attribute of an element.

Inherited from: \cHTMLFormElement::setDisabled()\cHTMLTextbox::setDisabled()

User Agents usually are showing the element as "greyed-out".

Example: $obj->setDisabled("disabled"); $obj->setDisabled("");

The first example sets the disabled flag, the second one removes the disabled flag.

Parameters
NameTypeDescription
$disabled

string Sets the disabled-flag if non-empty

Returns
TypeDescription
\none
methodpublicsetEvent( $event,  $action) : void
inherited

adds an "onXXX" javascript event handler

Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()\cHTMLTextbox::setEvent()

example: $item->setEvent("change","document.forms[0].submit");

Parameters
NameTypeDescription
$event

string Type of the event

$action

string Function or action to call (JavaScript Code)

methodpublicsetGenerateXHTML(bool $value) : void
staticinherited

Setter for static $_generateXHTML property

Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()\cHTMLTextbox::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetID( $id) : void
inherited

sets the ID class

Inherited from: \cHTML::setID()\cHTMLFormElement::setID()\cHTMLTextbox::setID()
Parameters
NameTypeDescription
$id
methodpublicsetMaxLength( $maxlen) : \none
inherited

sets the maximum input length of the text box.

Inherited from: \cHTMLTextbox::setMaxLength()
Parameters
NameTypeDescription
$maxlen

int maximum input length

Returns
TypeDescription
\none
methodpublicsetStyle( $style) : void
Parameters
NameTypeDescription
$style
methodpublicsetStyleDefinition( $entity,  $definition) : string
Parameters
NameTypeDescription
$entity

string Entity to define

$definition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicsetTabindex( $tabindex) : \none
inherited

sets the tab index for this element.

Inherited from: \cHTMLFormElement::setTabindex()\cHTMLTextbox::setTabindex()

The tab index needs to be numeric, bigger than 0 and smaller than 32767.

Parameters
NameTypeDescription
$tabindex

int desired tab index

Returns
TypeDescription
\none
methodpublicsetValue( $value) : \none
inherited

sets the initial value of the text box.

Inherited from: \cHTMLTextbox::setValue()
Parameters
NameTypeDescription
$value

string Initial value

Returns
TypeDescription
\none
methodpublicsetWidth( $width) : \none
inherited

sets the width of the text box.

Inherited from: \cHTMLTextbox::setWidth()
Parameters
NameTypeDescription
$width

int width of the text box

Returns
TypeDescription
\none
methodpublictoHTML() : void
inherited

Renders the output If the tag

Inherited from: \cHTML::toHTML()\cHTMLFormElement::toHTML()\cHTMLTextbox::toHTML()
methodpublictoHtml() : string
inherited

Renders the textbox

Inherited from: \cHTMLTextbox::toHtml()
Returns
TypeDescription
stringRendered HTML
methodpublicunsetEvent( $event) : void

example: $item->unsetEvent("change");

Parameters
NameTypeDescription
$event

string Type of the event

Documentation was generated by phpDocumentor 2.0.0a12.