contenido\classes\widgets\class.widgets.datechooser.php

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

Description:

Requirements:

Author
Unknwon  
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.datechooser.php 738 2008-08-27 10:21:19Z timo.trautmann $: }}  
Package
Contenido Backend classes  
Version
1.0  

\cDateChooser

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

Properties

>VPropertypublic$_content
Details
Type
n/a
Inherited_from
\cHTML::$$_content  
Inherited_from
\cHTMLFormElement::$$_content  
Inherited_from
\cHTMLTextbox::$$_content  
Inherited_from
\cDatefield::$$_content  
>VPropertypublicboolean $_contentlessTag
Details
Type
boolean
Access
private  
Inherited_from
\cHTML::$$_contentlessTag  
Inherited_from
\cHTMLFormElement::$$_contentlessTag  
Inherited_from
\cHTMLTextbox::$$_contentlessTag  
Inherited_from
\cDatefield::$$_contentlessTag  
>VPropertypublic$_oButton
Details
Type
n/a
>VPropertypublic$_oCalendar
Details
Type
n/a
>VPropertypublic$_oDate
inheritedInherited from: \cDatefield::$$_oDate
Details
Type
n/a
Inherited_from
\cDatefield::$$_oDate  
>VPropertypublic$_oImage
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\cDatefield::$$_requiredScripts
Details
Type
array
Access
private  
Inherited_from
\cHTML::$$_requiredScripts  
Inherited_from
\cHTMLFormElement::$$_requiredScripts  
Inherited_from
\cHTMLTextbox::$$_requiredScripts  
Inherited_from
\cDatefield::$$_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
\cDatefield::$$_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
\cDatefield::$$_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
\cDatefield::$$_skeleton_single  
>VPropertypublicstring $_styledefs
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_styledefs  
Inherited_from
\cHTMLFormElement::$$_styledefs  
Inherited_from
\cHTMLTextbox::$$_styledefs  
Inherited_from
\cDatefield::$$_styledefs  
>VPropertypublicstring $_tag
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_tag  
Inherited_from
\cHTMLFormElement::$$_tag  
Inherited_from
\cHTMLTextbox::$$_tag  
Inherited_from
\cDatefield::$$_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()\cDatefield::__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()\cDatefield::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
methodpubliccDateChooser( $name,  $initValue = false) : void

Parameters
NameTypeDescription
$name
$initValue
methodpubliccDatefield( $name,  $initvalue,  $width = 10) : void
inherited

Inherited from: \cDatefield::cDatefield()
Parameters
NameTypeDescription
$name
$initvalue
$width
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLTextbox::cHTML()\cDatefield::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
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
inherited

sets the access key for this element.

Inherited from: \cHTMLFormElement::setAccessKey()\cHTMLTextbox::setAccessKey()\cDatefield::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()\cDatefield::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()\cDatefield::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()\cDatefield::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
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()\cDatefield::setMaxLength()
Parameters
NameTypeDescription
$maxlen

int maximum input length

Returns
TypeDescription
\none
methodpublicsetReadOnly( $bReadOnly = true) : void

Parameters
NameTypeDescription
$bReadOnly
methodpublicsetSelectsToHide( $aSelectIDs) : void

Parameters
NameTypeDescription
$aSelectIDs
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()\cDatefield::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()\cDatefield::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()\cDatefield::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()\cDatefield::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.